#include <bits/stdc++.h>
#define ll long long
#define endll '\n';
#define pb push_back
#define all(v) v.begin(), v.end()
using namespace std;
const int mod = 1e9 + 7, N = 1e6;
int dp[N];
int rec(int x) {
if(x < 0) return 1e5;
if(x == 0) return 0;
if(dp[ x] != -1) return dp[x];
int ans = 1e9;
ans = min(ans, rec(x - 2) + 1);
ans = min(ans, rec(x - 3) + 1);
return dp[x] = ans;
}
void solve()
{
int n; cin >> n;
int xr = 0;
for(int i = 1; i <= n; i++) {
int x; cin >> x;
xr ^= x;
}
cout << xr << endll;
}
int32_t main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int t = 1;
for(int i = 0; i <= 200; i++) dp[i] = -1;
// cin >> t;
while (t--) {
solve();
}
return 0;
}