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

Ex Input:
Problem: a , b and c are partners in a business . their capitals are respectively , rs . 5000 , rs . 6000 and rs . 4000 . a gets 30 % of the total profit for managing the business . the remaining profit is divided among 3 in the ratio of their capitals . in the end of the year , the profit of a is rs . 200 more than the sum of the profits of b and c . find the total profit ?

Ex Output:
3000


Ex Input:
Problem: a 270 metres long bullet train running at the speed of 120 kmph crosses another bullet train running in opposite direction at the speed of 80 kmph in 9 seconds . what is the length of the other bullet train ?

Ex Output:
230


Ex Input:
Problem: andrew purchased 8 kg of grapes at the rate of 70 per kg and 9 kg of mangoes at the rate of 55 per kg . how much amount did he pay to the shopkeeper ?

Ex Output:

1055