
fun main(args:Array<String>) {
    val (A,B,C) = readLine()!!.split(" ").map(String::toInt)
    println(when(Pair(A==B,B==C)) {
      Pair(true, false) -> C
      Pair(false,true) -> A
      else -> B
    } )
}

