How many hours does it take a train travelling at an average rate of 40mph between stops to travel a miles if it makes n stops of m minutes each?