import java.util.Scanner;
public class Main {
         /*方法1:a^a=0 a^0=a 异或满***换律
     * */
    public static int printOdd1(int[] arr) {
        int e0 = 0;
        for (int cur : arr) {
            e0 ^= cur;
        }
        return e0;
    }

    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        int[] arr=new int[n];
        for (int i = 0; i <n ; i++) {
            arr[i]=in.nextInt();
        }
        int res= printOdd1(arr);
        System.out.println(res);
    }
}