There are a number of cities in a row, and there are two bus lines that go between them. They both visit all cities in order, but one may take longer than the other to go between any two cities. Starting on or moving to the blue line takes a certain amount of extra time. There is no extra time required to start on or move to the red line. Determine the minimum cost to move from the first city to each of the cities.