Thomas got a haircut from the barber. If the haircut cost $34 and he wants to leave a 18% tip, how much will he pay in total?