P and Q together have 3 times what Q and R have, while P, Q, and R together have thirty rupees more than P. If Q has 5 times what R has then what amount does P have?

a) 20
b) 15
c) 10
d) 5