Ellie had $200 originally.
She spent $32 a day for 5 days. This means that she spends:

Therefore, she has left:

She bought gelato for her and her three friends for $6 each. This means that she spent on gelato:

Subtracting this from the remaining balance, we have:

At the end of the trip, Ellie has $16 left.