Ram borrowed some money at the rate of 6% p.a. for the first 6 years, at the rate of 8% p.a. for next 8 years, and 9% p.a. for next 9 years and pays a total simple interest of Rs. 36200, how much money did he borrow?