Your math homework has 6 more than three times the number of problems you have on your history worksheet. If you have 42 problems to do for math and history, how many math problems do you have to complete for homework?