import Glibc
extension String: CollectionType {}

var abc = readLine()!.split(" ").map { Int($0)! }
if abc[0] == abc[1] {
  print(abc[2])
} else if abc[1] == abc[2] {
  print(abc[0])
} else {
  print(abc[1])
}