#include <bits/stdc++.h>
using namespace std;
#define int long long
//一边输入一边异或即可 因为x ^ x = 0,0 ^ x = x ,所以出现偶数次数异或和的为0,所以我们可以这样
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n ;
int ans = 0;
for(int i = 0;i < n;i++)
{
int x;
cin >> x;
ans ^= x ;
}
cout << ans << "\n";
return 0;
}

京公网安备 11010502036488号