#include <bits/stdc++.h>
using namespace std;

bool smaller(int x);

int find_number(int MAX) {
    int l = 1, r = MAX;
    while (l < r) {
        int m = max(l + 1, (l + r) / 2);
        if (smaller(m)) {
            r = m - 1;
        } else {
            l = m;
        }
    }
    return l;
}