There are ramen factories, numbered from to in order. Gyojun wants to buy exactly packages of ramen from factory .
In one purchase, he may choose at most consecutive factories and buy one package from each chosen factory. If he chooses factories, the purchase costs won.
Find the minimum total cost of buying all the required ramen.
The input is given in the following format:
Print the minimum total cost.