Rye borrowed some money at the rate of 6 % p.a. for the first three years, 9% p.a. for the next five years and 13% p.a. for the period beyond eight years if the total interest paid by him at the end of eleven years is p8160, how much money did he borrow