Manoj borrowed Rs.3450 from Anwar at 6% p.a. simple interest for three years. He then added some more money to the borrowed sum and lent it to Ramu for the same time at 9% p.a. simple interest. If Manoj gains Rs.824.85 by way of interest on the borrowed sum as well as his own amount from the whole transaction, then what is the sum lent by him to Ramu?