A simple math program for calculating the Scales problem from Bachet.