#include using namespace std; int main() { int B[9]; for (int i = 0; i < 9; i++) { cin >> B[i]; } if (B[0] == 2) { cout << 1 << endl; return 0; } for (int i = 0; ; i++) { if (B[i + 1] - B[i] != 1) { cout << B[i] + 1 << endl; break; } } }