Total Earnings Problem