You will be given a definition of a task first, then some input of the task.
The task is to generate the correct answer for a given math problem.

Problem: p , q and r have $ 4000 among themselves . r has two - thirds of the total amount with p and q . find the amount with r ?
Output:
160