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

Example Input: Problem: if a - b = 5 and a 2 + b 2 = 31 , find the value of ab .
Example Output: 3

Example Input: Problem: how many numbers are divisible by both 2 and 3 up to 300 ?
Example Output: 50

Example Input: Problem: two trains leave a station traveling the same direction . train a leaves the station traveling at a constant speed of 60 mph , and train b leaves the station traveling at a constant speed of 80 mph . if both trains maintain constant speeds , in how many minutes will train b overtake train a if train a left 40 minutes prior to train b ?
Example Output:
120