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

int find_number(int MAX) {
    int l = 1, r = 1e9, ans = -1;
    while(l < r){
		//~ cout << l << " " << r << endl;
		if(r-l == 1){
			if(smaller(r))return l;
			else return r;
		}
		
		int mid = (l + r) / 2;
		if(smaller(mid)){
			r = mid - 1;
		}
		else {
			l = mid;
		}
	}
	
	return l;
	
}

