using namespace std;
bool smaller(int x);
int find_number(int MAX) {
    int st = 0, dr = MAX + 1;
    while(dr - st > 1)
    {
        int mid = (st + dr) >> 1;
        if(smaller(mid))
            dr = mid;
        else
            st = mid;
    }
    return st;
}