On Monday, Dan leaves his house at 8:10 AM and bikes to the office, which is 7 miles away. He is able to bike at a constant speed of 10.5 mph.
On Tuesday, Dan feels lazy and decides to take the 8:16AM train to work. The train takes 13 minutes to reach the Palo Alto stop, and then it takes Dan 5 minutes to walk to work. How much time (in minutes) does he have to grab a bagel, if he wants to get to work as the same time as he did on Monday?