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 ?
n0 = 4000.0
t0 = 2.0 * 2.0
t1 = 1.0 * 3.0
t2 = t0 / 3.0
t3 = n0 * t0
t4 = t2 * 3.0
t5 = t4 + t1
t6 = t5 + t1
answer = t3 / t6
print(answer)