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

Example Input: Problem: the compound interest on $ 30,000 at 7 % p . a is $ . 4347 . find out the period ( in years ) ?
Example Output: 2

Example Input: Problem: if z is a multiple of 8778 , what is the remainder when z ^ 2 is divided by 9 ?
Example Output: 0

Example Input: Problem: 7 , 26 , 63 , 124 , 215 , 342 , ( . . . . )
Example Output:
511