Two friends P and Q started a business investing in the ratio of 5 :6. R joined them after six months investing an amount equal to that of Q's. At the end of the year, 20% profit was earned which was equal to Rs. 98,000. What was the amount invested by R ?