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

Ex 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 ?

Ex Output:
4


Ex Input:
Problem: a statue is being carved by a sculptor . the original piece of marble weighed 180 kg . in the first week 28 percent is cut away . in the second week 18 percent of the remainder is cut away . in the third week the statue is completed when 20 percent of the remainder is cut away . what is the weight of the final statue ?

Ex Output:
85 kg


Ex Input:
Problem: a lent rs . 5000 to b for 2 years and rs . 3000 to c for 4 years on simple interest at the same rate of interest and received rs . 1540 in all from both of them as interest . the rate of interest per annum is ?

Ex Output:

7 %