Vijay had some bananas, and he divided them into two lots A and B. He sold the first lot at the rate of Rs. 2 for 3 bananas and the second lot at the rate of Rs. 1 per banana, and got a total of Rs. 400. If he had sold the first lot at the rate of Rs. 1 per banana, and the second lot at the rate of Rs. 4 for 5 bananas, his total collection would have been Rs. 460. Find the total number of bananas he had.