David went to a lot of concerts over the past year with different groups of friends. He went to a concert that cost $32 per ticket with one friend, a concert that cost $18 per ticket with two friends, and a concert that cost $54 by himself. How much money was spent by David and his friends on tickets?