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

Example Input: Problem: 1,000 ^ 2 + 1,001 ^ 2 + 1,002 ^ 2 + 1,003 ^ 2 + 1,004 ^ 2 =
Example Output: 6

Example Input: Problem: a and b invests rs . 10000 each , a investing for 6 months and b investing for all the 12 months in the year . if the total profit at the end of the year is rs . 24000 , find their shares ?
Example Output: 8000

Example Input: Problem: a and b can together finish a work in 40 days . they worked together for 10 days and then b left . after another 21 days , a finished the remaining work . in how many days a alone can finish the job ?
Example Output:
2