package com.codegym.task.task04.task0441;
/*
Somehow average
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String x = reader.readLine();
String y = reader.readLine();
String z = reader.readLine();
int a = Integer.parseInt(x);
int b = Integer.parseInt(y);
int c = Integer.parseInt(z);
if((a > b && c > b) || (b > a && c > a))
{
if(a >= b && b <= c)
{
System.out.println(b);
}
else if(a >= c && b >= c)
{
System.out.println(c);
}
else
{
System.out.println(a);
}
}
else
{
System.out.println(c);
}
}
}