The task is to generate the correct answer for a given math problem.

Ex Input:
Problem: joan took out a mortgage from hel local bank . each monthly mortgage payment she makes must be triple the amount of the previous month ' s payment . if her first payment is $ 100 , and the total amount she must pay back is $ 914800 , how many months will it take joan to pay back her mortgage ?

Ex Output:
9


Ex Input:
Problem: a , b and c , each working alone can complete a job in 6 , 8 and 12 days respectively . if all three of them work together to complete a job and earn $ 1170 , what will be b ' s share of the earnings ?

Ex Output:
$ 390


Ex Input:
Problem: if a - b = 3 and a ( power 2 ) + b ( power 2 ) = 29 , find the value of ab .

Ex Output:

10