A delivery service charges $5 for the first mile and $2 for each additional mile. If a customer orders a delivery and the total charge is $17, how many miles did the delivery cover? Let's think step by step and output the final answer within \boxed{}.
user