#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int data[] = {7,7,7,7,7,7,42,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7};
size_t N = sizeof(data)/sizeof(data[0]);
sort(data, data+3);
int non_unique = data[1];
for (int i = 0 ; i != N ; i++) {
if (data[i] != non_unique) {
cout << data[i] << endl;
break;
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewogICAgaW50IGRhdGFbXSA9IHs3LDcsNyw3LDcsNyw0Miw3LDcsNyw3LDcsNyw3LDcsNyw3LDcsNyw3LDcsNyw3fTsKICAgIHNpemVfdCBOID0gc2l6ZW9mKGRhdGEpL3NpemVvZihkYXRhWzBdKTsKICAgIHNvcnQoZGF0YSwgZGF0YSszKTsKICAgIGludCBub25fdW5pcXVlID0gZGF0YVsxXTsKICAgIGZvciAoaW50IGkgPSAwIDsgaSAhPSBOIDsgaSsrKSB7CiAgICAgICAgaWYgKGRhdGFbaV0gIT0gbm9uX3VuaXF1ZSkgewogICAgICAgICAgICBjb3V0IDw8IGRhdGFbaV0gPDwgZW5kbDsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIDA7Cn0=