#include <iostream>
#include <cstdint>

using namespace std;

bool smaller(int x) {
    int jury_num;
    cin >> jury_num;
    return jury_num < x;
}

int find_number(int MAX) {
    for (uint32_t i = 1; i <= MAX; i++) {
        if (smaller(i)) {
            return i - 1;
        }
    }
}