Combining two keypad strokes to one variable

Assuming that the smallest press is 0 and the largest press is 9, how about 10*press1+press2 ?

Of course, the cases will be values like 10, 11, and 25. There is no '10', '11', or '25'.