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

Example Input: Problem: a palindrome is a number that reads the same front - to - back as it does back - to - front ( e . g . 202 , 575 , 1991 , etc . ) p is the smallest integer greater than 500 that is both a prime and a palindrome . what is the sum of the digits of p ?
Example Output: 4

Example Input: Problem: how much interest will $ 8,000 earn in 9 months at an annual rate of 6 % ?
Example Output: $ 360

Example Input: Problem: a jogger running at 9 kmph along side a railway track is 260 metres ahead of the engine of a 120 metre long train running at 45 kmph in the same direction . in how much time will the train pass the jogger ?
Example Output:
38 sec