#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <limits>
#include <cstring>
using namespace std;
void solve() {
int n; cin >> n;
std::vector<int> a(n);
map<int, int> mp;
for(int i = 0; i < n; i++) {
cin >> a[i];
mp[a[i]]++;
}
for(auto& e : mp) {
if(e.second == 1) {
cout << e.first << endl;
break;
}
}
}
int main() {
ios::sync_with_stdio(0);
cin.tie(nullptr);
int t = 1;
//cin >> t;
for (int i = 1; i <= t; i++) {
solve();
}
return 0;
}