This page is still under construction.

Parts of this page are still being built. What you see may change.

Three Numbers

Time limit1sMemory limit256 MB

Summary
Print the median of three given integers between 1 and 100.
Level

Easy1 of 10

Topics
Sorting
Solved
No attempts yet

Problem

Given three integers AA, BB, and CC, print the second largest value.

Input

One line with three integers AA, BB, CC (1≤A,B,C≤1001 \leq A, B, C \leq 100).

Output

Print the second largest integer.

Examples5

  1. Example 1

    Input
    20 30 10
    
    Expected output
    20
    
  2. Example 2

    Input
    30 30 10
    
    Expected output
    30
    
  3. Example 3

    Input
    40 40 40
    
    Expected output
    40
    
  4. Example 4

    Input
    20 10 10
    
    Expected output
    10
    
  5. Example 5

    Input
    1 2 3
    
    Expected output
    2