#include <bits/stdc++.h>
#include "guess.h"
using namespace std;
int find_number(int MAX)
{
    int l=0,r=MAX,pos=-1;
    while(l<r)
    {
        int mid=(l+r)/2;
        if(!smaller(mid))
        {
            pos=mid;
            l=mid+1;
        }
        else
        {
            r=mid-1;
        }
    }
    return pos;
}
