Space shuttle Endeavour (Endeavour is of British style, and Endeavor is of American style. Why NASA uses the British style? You can find the answer by Baidu or Google) is in danger!
Endeavour meets the same problem as Columbus had met in 2003. When it was sent into space, some material on the surface of the space shuttle is damaged. When it reenters the atmosphere, hot air may destroy the shuttle and make it fall into pieces. NASA says that the only method to save Endeavour is to send another shuttle into space to help repair the Endeavour. But considering the condition of other shuttles available, such as Atlantis and Discovery, scientists think they are not capable to complete the demanding task. NASA has to build another new space shuttle.
There are N parts of this new shuttle need to be built. Because the shuttle will be assembled before all parts are ready. NASA wants to minimize the time to build all parts.
There are two workshops S1 and S2. A part must be processed by these two workshops in order, which means that a part must be processed first in S1 and then in S2. It is known that a workshop cannot process more than one part simultaneously. You job is to calculate the minimum time to build all parts.