bool smaller(int x);

int find_number(int MAX) {
    int mi = 0;
    int ma = MAX + 1;

    while (mi + 1 < ma) {
        int m = (mi + ma) / 2;

        if (smaller(m)) {
            ma = m;
        } else {
            mi = m;
        }
    }
    
    return mi;
}

