#include<iostream>
#include<vector>
#include<unordered_map>
#define debug
using namespace std;
int find(vector<int> documents){
unordered_map<int,bool> map;
for (auto i:documents){
if (map[i]){
return i;
}
map.insert(pair(i,true));
//
}
return -1;
}
int main(){
#ifdef debug
vector<int> documents = {2, 5, 3, 0, 5, 0};
cout << find(documents) << endl;
#endif
// unordered_map<int,bool> map;
// map.insert(pair<int,bool>(3,true));
system("pause");
}