Average cost of 5 mangoes and 4 apples is Rs. 36. The average cost of 7 mangoes and 8 apples is Rs. 67. Find the total cost of 24 apples and 24 mangoes.