Problem E. 5. Paint
Input file name: standard input
Output file name: standard output
Time limit: 1 s
Memory limit: 1024 MB
Without lifting his pencil from the paper, Petriukas drew the figure shown below.
Given the distances A, B, C, D, and E, help determine the shortest possible distance the pencil could have traveled on the paper while drawing this figure.

Input

A single line contains five natural numbers A, B, C, D, E (1 \le A,B,C,D,E \le 1000)

Output

Print the minimum possible distance.

Example

standard inputstandard output
5 4 6 2 7 30