Multi-story mechanical parking facilities are becoming popular in crowded cities, as they are space efficient. Each floor of such a facility consists of two rail-mounted automated carriers on a pair of rails running from one end to the other, and rows of cells along the rails, where each cell can accommodate one car. The number of rows varies from one to four. There are two elevators connecting all floors, which are dedicated to removal and placing of the cars, respectively. When many cars are waiting to enter and to leave, it is important to schedule the movement of carriers so that the required time is minimized. As a basic subproblem for an efficient scheduling of the total system, we consider here the problem of finding an optimal schedule when an ordered set of car removals is given. We present here an exact algorithm based on dynamic programming, which shows the problem can be solved in polynomial time even if it is a quite complicated combinatorial problem. Some computational results of nontrivial sizes are presented.