#!/usr/bin/env python3

import math
import os
import random
import re
import sys

from collections import Counter

#
# Complete the 'lonelyinteger' function below.
#
# The function is expected to return an INTEGER.
# The function accepts INTEGER_ARRAY a as parameter.
#


def get_key(my_dict, val):
    for key, value in my_dict.items():
         if val == value:
             return key
    return "key doesn't exist"


def lonelyinteger(a):
    # Write your code here
    d = Counter(a)
    key = get_key(d, 1)
    return key


if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    n = int(input().strip())

    a = list(map(int, input().rstrip().split()))

    result = lonelyinteger(a)

    fptr.write(str(result) + '\n')

    fptr.close()


#!/usr/bin/env python3

import math
import os
import random
import re
import sys

from collections import Counter

#
# Complete the 'lonelyinteger' function below.
#
# The function is expected to return an INTEGER.
# The function accepts INTEGER_ARRAY a as parameter.
#


def get_key(my_dict, val):
    for key, value in my_dict.items():
         if val == value:
             return key
    return "key doesn't exist"


def lonelyinteger(a):
    # Write your code here
    d = Counter(a)
    key = get_key(d, 1)
    return key


if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    n = int(input().strip())

    a = list(map(int, input().rstrip().split()))

    result = lonelyinteger(a)

    fptr.write(str(result) + '\n')

    fptr.close()


#!/usr/bin/env python3 # # Complete the 'lonelyinteger' function below. # # The function is expected to return an INTEGER. # The function accepts INTEGER_ARRAY a as parameter. # # Write your code here