P25492 [AtCoder] [ABC028C] Man Who Picks Three Numbers
普及-
题目描述

Problem Description

You are given five distinct integers.

From these, choose three and output the third largest sum that can be represented by these three numbers.

Input Format

The input is given from the standard input in the following format:

$ A $ $ B $ $ C $ $ D $ $ E $

One line with five integers $ A, B, C, D, E (1 ≦ A $ separated by spaces.

Output Format

Output the result as described in the problem statement. The output should be to the standard output, with a newline at the end.

Sample Input and Output

Sample Input #1

1 2 3 4 5

Sample Output #1

10

Sample Input #2

1 2 3 5 8

Sample Output #2

14

Notes/Hints

Sample Explanation 1

The sums that can be represented by picking three numbers are $ 6, 7, 8, 9, 10, 11, 12 $. Therefore, output the third largest sum, which is $ 10 $.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1 2 3 4 5
样例输出
10