3rd Balkan Olympiad in Informatics
Varna, Bulgaria, 5-11 October 1995


Day 2 - Problem 1 (Deliveries)



A firm occupies a 10-floors building. After finishing the work day, clerk John has to carry identical packages between floors. He starts and ends this job on floor 1 and can carry only one package.

Write a program that finds the minimum number m of the climbed floors and with the corresponding way of traveling.