n = int(input()) a = list(map(int, input().split())) xor = 0 for num in a: xor ^= num print(xor)