Maria has $50. Maria gives away half the money to her friend. Her friend then buys $8 worth of snacks. If her friend has $17 left, how much money, in dollars, did her friend have initially? Let's think step by step and output the final answer within \boxed{}.
user