Till now, there have been no COVID-19 cases identified in the country XYZ. Scientists and researchers there have conducted a research and discovered that, in a street with houses (imagine that the houses are only on one side of the street, the other side is empty), if residents in a house were affected with the novel Coronavirus, there is a high probability for the houses on either side of that house to be diagnosed with Coronavirus as well. This will result in an extremely high possibility for almost all the houses be affected by COVID-19.

Hearing this, the President of the country XYZ has decided to execute(kill) residents in some houses to save more people from that street.

You will be given an input string, containing the number of residents in adjacent houses for a specific street. Your task to find the maximum number of residents that can be saved from getting infected by COVID-19.

Input Format

Input string contains a set of integers seperated by a space

Constraints

Number of houses in a lane

Output Format

Print the maximum number of residents that can be saved from getting infected by COVID-19.

Sample Input 0

3 5 3 4 3 6

Sample Output 0

15

Can anyone explain the logic behind this one?

I think this post is way past inappropriate. I cannot imagine a normal teacher

composing such a question during this time in our situation. You should show this
question to your parents and it should be brought to the attention of somebody in authority.