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

int find_number(int MAX)
{
      int l=1,r=MAX,res=MAX+1;
      while(l<=r){
            int mid=(l+r)>>1;
            if(smaller(mid)){
                  res=min(res,mid);
                  r=mid-1;
            }
            else l=mid+1;
      }
      return res-1;
}

