In a neighborhood survey, it was found that the average cost of a meal at three restaurants was $25. If the first restaurant charged $20 and the second restaurant charged $30, what was the cost of a meal at the third restaurant? Let's think step by step and output the final answer within \boxed{}.
user