JustOneOutlet

just one outlet The International Olympiad in Informatics (IOI) is the most prestigious programming competition for high school students; its approximately 300 competitors gather in a different country each year for the competition's two-day race. Naturally, competitors use their free time to access the Internet, program and play games on their laptops, but they ran into a problem: the hotel lobby has only one power outlet.

Fortunately, the four competitors of the Brazilian team of IOI each brought a power strip, thus allowing to connect several notebooks in a single socket; they can also link one strip to another to further increase the number of available outlets. However, since the strips have many outlets, they asked you to write a program that, given the number of outlets on each strip, determines how many outlets can be made available in the hotel lobby.

Input The input consists of a line with four positive integers T1, T2, T3, T4, indicating the number of outlets for each of the four rulers.

Exit Your program should print a single line containing a single integer, indicating the maximum number of notebooks that can be connected at the same time.