#include <bits/stdc++.h>
using namespace std;
int main() {
int n = 5;
vector<int> a(n);
set<int> b;
for(int i = 0;i < n;++i){
cin>>a[i];
b.insert(a[i]);
}
vector<int> bb(b.begin(),b.end());
if((int)bb.size() >= 2)
cout<<bb[1];
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCWludCBuID0gNTsKCXZlY3RvcjxpbnQ+IGEobik7CglzZXQ8aW50PiBiOwoJZm9yKGludCBpID0gMDtpIDwgbjsrK2kpewoJCWNpbj4+YVtpXTsKCQliLmluc2VydChhW2ldKTsKCX0KCXZlY3RvcjxpbnQ+IGJiKGIuYmVnaW4oKSxiLmVuZCgpKTsKCWlmKChpbnQpYmIuc2l6ZSgpID49IDIpCgkJY291dDw8YmJbMV07CglyZXR1cm4gMDsKfQ==