At a rental car agency they charge $16 to rent a car and $0.12 for each mile driven. How many miles was the car driven if the total bill was $40?