#include "guess.h"
int find_number(int MAX) {
    int left = 1, right = MAX;
    
    while (left <= right) {
        int mid = right + (left - right) / 2;
        if (smaller(mid)) return mid;
        else left = mid + 1;
    }
    return -1;
}