In a school function Rs 360 remained after spending 82% of the money. How much money was there in the beginning? Verify your answer.