Rahul spent half the money he had on a notebook and half of that amount on a pen.He is now left with RS10. How much money did he have initially?

X - 1/2x - 1/2(1/2x) = 10

Solve for x.