#include "guess.h"
#include <bits/stdc++.h>

int find_number(int MAX)
{
int st=1,x=0,g=0,r=0;
while(st<=MAX)
{
x=(st+MAX)/2;
if((st+MAX)%2==1) x++;
if(MAX-st==1 || MAX==st) break;
g=smaller(x);
if(g==0) st=x;
else MAX=x-1;
}
x=st;
if(MAX!=st) if(smaller(MAX)==0) x=MAX;
return x;
}

