let readString() = stdin.ReadLine()
let readStringArray() = stdin.ReadLine().Split(' ');
let readInt() = readString() |> int
let readIntArray() = readStringArray() |> Array.map (fun x -> int x)


let n = readIntArray()
Array.groupBy (fun x -> x) n 
|> Array.where (fun x -> snd(x).Length = 1)
|> Array.head
|> fun x -> fst x
|> printfn "%d"