package com.javarush.task.task04.task0441;
/*
Как-то средненько
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader= new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(reader.readLine());
int b = Integer.parseInt(reader.readLine());
int c = Integer.parseInt(reader.readLine());
int min = Math.min(a, Math.min(b,c));
int max = Math.max(a, Math.max(b,c));
int half = a+b+c -(min + max) ;
if (a==b && b==c){
System.out.println(a);
}else if (half> 0){
System.out.println(half);
}else if (a==b || a==c){
System.out.println(a);
}else if (b==c ){
System.out.println(b);
}else {
System.out.println("fail");
}
//напишите тут ваш код
}
}