// Shaazzz
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
scanf("%d", &n);
long long x, xor_sum = 0;
while (n --)
scanf("%I64d", &x), xor_sum ^= x;
return !printf("%lld", xor_sum);
}
Ly8gU2hhYXp6egojaW5jbHVkZTxiaXRzL3N0ZGMrKy5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbigpCnsKCWludCBuOwoJc2NhbmYoIiVkIiwgJm4pOwogICAgbG9uZyBsb25nIHgsIHhvcl9zdW0gPSAwOwogICAgd2hpbGUgKG4gLS0pCiAgICAJc2NhbmYoIiVJNjRkIiwgJngpLCB4b3Jfc3VtIF49IHg7CiAgICByZXR1cm4gIXByaW50ZigiJWxsZCIsIHhvcl9zdW0pOwp9