Definition: The task is to generate the correct answer for a given math problem.
Input: Problem: in a group of ducks and cows , the total number of legs are 40 more than twice the number of heads . find the total number of cows .
Output:
2