Use the number of buttons to calculate the number system