Imagine that there are stairs and a person standing at the bottom. Climbing the stairs, the person can either go to the next step or jump over it. Each stairstep has a price represented by a positive integer number. Write a program that reads a series of integer numbers from the console and prints the minimum sum the person must pay to reach the top of the stairs.
For example, if the stairs prices are 20 30 15 3 1 50 20 then the minimum sum will be 54: