#include <bits/stdc++.h>
#include "guess.h"
int find_number(int MAX)
{
    int i1=0,i2=MAX,mij,rez=0;
    while(i1<=i2)
    {
        mij=(i1+i2)/2;
        bool ok=smaller(mij);
        if(ok==1)
            i2=mij-1;
        else
        {
            rez=mij;
            i1=mij+1;
        }
    }
    return rez;
}
