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

Example Input: Problem: ajay can ride 50 km in 1 hour . in how many hours he can ride 1000 km ?
Example Output: 20 hrs

Example Input: Problem: if p / q = 3 / 11 , then 2 p + q = ?
Example Output: 17

Example Input: Problem: 4 balls of different colors are to be placed in 3 different boxes such that any box contains at least 1 ball . what is the maximum number of different ways in which this can be done ?
Example Output:
18