object Main {
  def main(args: Array[String]): Unit = {
    val nums   = scala.io.StdIn.readLine.split( " " ).map{ _.toInt }

    if      ( nums( 0 ) == nums( 1 ) ) println( nums( 2 ) )
    else if ( nums( 1 ) == nums( 2 ) ) println( nums( 0 ) )
    else                               println( nums( 1 ) )
  }
}