#include "guess.h"
int find_number(int MAX) {
    int l = 1;
    int r = MAX - 1;
    int ans = MAX;

    while (l <= r) {
        int mid = (l + r) / 2;
        if (smaller(mid)) {
            r = mid - 1;
        } else {
            ans = mid;
            l = mid + 1;
        }
    }

    return ans;
}

