#P15055. [UOI 2023 II Stage] Gallery

[UOI 2023 II Stage] Gallery

题目描述

Cossack Vus works in a gallery, and he was given the task of building the highest tower of vases possible.

He has three vases with heights aa, bb, cc. However, unfortunately, if three vases are placed on top of each other, the structure will quickly break. Cossack can only choose two vases and place them on top of each other. He wants to get the highest composition of vases.

Find the maximum height he can reach.

输入格式

The first line contains three integers aa, bb, cc (1a,b,c1081 \le a,b,c \le 10^8).

输出格式

Output the maximum height of the composition that satisfies the condition.

7 4 3
11
2 2 6
8

提示

In the first example, we can take the first and second vases. The height of the composition will be 7+4=117+4=11.

In the second example, we can take the second and third vases. The height of the composition will be 2+6=82+6=8. You can also take the first vase instead of the second.