//sol 5369666174
#include<bits/stdc++.h>
using namespace std;
#define mxx 200005
#define ll long long
#define answ ((out)?"YES":"NO")
#define endl '\n'
void solve(int tc){
int n;
cin>>n;
int out=0,a;
for(int i=0;i<n;i++){
cin>>a;
out^=a;
}
cout<<out<<endl;
}
void sub_run(){
#ifndef ONLINE_JUDGE
freopen("inp.txt", "r", stdin);
freopen("out.txt", "w", stdout);
#endif // ONLINE_JUDGE
}
int main(){
//ios_base::sync_with_stdio(false);
//cin.tie(NULL);
int t=1;
// sub_run();
// cin>>t;
for(int i=1;i<=t;i++)solve(i);
}