An investment firm invested in two companies last year. They invested $8000 in Company A and made a profit of 11%. They invested $24,000 in Company B and made a profit of 13%. What was the investment firm's total profit?