A trader has 240 kilograms of mangoes and 189 kilograms of guavas. He sells all the mangoes at 60 baht per kilogram. However,he only mangoes to sell 77 kilograms of the guava at 45 baht per kilogram. He sells the remaining guava at 35 baht per kilogram. How much money does the trader make altogether from the sale of the fruits?