In a joint venture, A and B invested Rs. 32000 and Rs. 56000 respectively. A received Rs. 1000 per month as salary for managing the business and the remaining profit was divided in the ratio of their investments. At the end of the year A received a total of Rs. 20000, how much did B receive?