Haley spent the following amount of money on gas for the past six weeks: $35, $68, $17, $41, $58, $89, and $39. What was the median amount of money Haley spent on gas?