#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define REP(i,n) for(int i=0;i( \ ( std::ostringstream() << std::dec << x ) ).str() #define ALL(s) (s).begin(), (s).end() using namespace std; typedef long long unsigned int llu; typedef long long ll; int main (){ string s; bool b = false; while (cin >> s){ int last ; int next ; sscanf(s.c_str(),"%d",&next); if(next - last != 1){ cout << last + 1 << endl ; b = true; break; } last = next; } if(!b) cout << 10 << endl; return 0; }