#include <stdio.h>

int main() {
    int n = 0,m = 0;
    scanf("%d",&n);
    int sum = 0;
    while(scanf("%d",&m)!=EOF)
    {
        sum ^= m;
        //n--;
    }
    printf("%d",sum);
    return 0;
}