def lonely_integer(a):
    result = 0
    for num in a:
        result ^= num
    return result


n = int(raw_input().strip())
a = [int(a_temp) for a_temp in raw_input().strip().split(' ')]
print(lonely_integer(a))

2f232a60b638e612a191a888a4138d802d8cc805
<mask token>

def lonely_integer(a):
    result = 0
    for num in a:
        result ^= num
    return result


<mask token>

def lonely_integer(a):
    result = 0
    for num in a:
        result ^= num
    return result


<mask token>
print(lonely_integer(a))

def lonely_integer(a):
    result = 0
    for num in a:
        result ^= num
    return result


n = int(raw_input().strip())
a = [int(a_temp) for a_temp in raw_input().strip().split(' ')]
print(lonely_integer(a))
