Jim began a 217 -mile bicycle trip to build up stamina for a triathlete competition. Unfortunately, his bicycle chain broke, so he finished the trip walking. The whole trip took 7 hours. If Jim walks at a rate of 5 miles per hour and rides at 33 miles per hour, find the amount of time he spent on the bicycle.