#include<bits/stdc++.h>using namespace std;
unordered_map<int, int> mp;
int main(){ int in; while(cin >> in) mp[in]++; for(auto it: mp){ if(it.second % 3){ cout << it.first; break; } }}