CF358D Dima and Hares

Description

Dima liked the present he got from Inna very much. He liked the present he got from Seryozha even more. Dima felt so grateful to Inna about the present that he decided to buy her $ n $ hares. Inna was very happy. She lined up the hares in a row, numbered them from 1 to $ n $ from left to right and started feeding them with carrots. Inna was determined to feed each hare exactly once. But in what order should she feed them? Inna noticed that each hare radiates joy when she feeds it. And the joy of the specific hare depends on whether Inna fed its adjacent hares before feeding it. Inna knows how much joy a hare radiates if it eats when either both of his adjacent hares are hungry, or one of the adjacent hares is full (that is, has been fed), or both of the adjacent hares are full. Please note that hares number 1 and $ n $ don't have a left and a right-adjacent hare correspondingly, so they can never have two full adjacent hares. Help Inna maximize the total joy the hares radiate. :)

Input Format

The first line of the input contains integer $ n $ $ (1

Output Format

In a single line, print the maximum possible total joy of the hares Inna can get by feeding them.