C - The Third Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

注意

この問題に対する言及は、2019年12月29日 05:00 JST まで禁止されています。言及がなされた場合、賠償が請求される可能性があります。

試験後に総合得点や認定級を公表するのは構いませんが、どの問題が解けたかなどの情報は発信しないようにお願いします。

問題文

6 つの相異なる整数 A, B, C, D, E, F が与えられる。

このうち 3 番目に大きい数を調べるプログラムを作成せよ。

制約

  • 1 \leqq A, B, C, D, E, F \leqq 100
  • A, B, C, D, E, F はすべて異なる。
  • 入力中の値はすべて整数である。

入力

入力は以下の形式で標準入力から与えられる。

A B C D E F

出力

3 番目に大きい整数を出力せよ。


入力例 1

4 18 25 20 9 13

出力例 1

18

3 番目に大きい数は 18 である。


入力例 2

95 96 97 98 99 100

出力例 2

98

入力例 3

19 92 3 35 78 1

出力例 3

35

Warning

Do not make any mention of this problem until December 29, 2019, 05:00 a.m. JST. In case of violation, compensation may be demanded.

After the examination, you can reveal your total score and grade to others, but nothing more (for example, which problems you solved).

Problem Statement

Given are six distinct integers A, B, C, D, E, and F.

Write the program that finds out the third-largest number among them.

Constraints

  • 1 \leq A, B, C, D, E, F \leq 100
  • A, B, C, D, E, and F are all different.
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B C D E F

Output

Print the third-largest integer.


Sample Input 1

4 18 25 20 9 13

Sample Output 1

18

The third-largest number is 18.


Sample Input 2

95 96 97 98 99 100

Sample Output 2

98

Sample Input 3

19 92 3 35 78 1

Sample Output 3

35