A rental company charges $40 a day and 30 cents a mile for renting a truck. Michael rents a truck for 5 days, and his bill comes to $314. How many miles did he drive?