int find_number(int MAX){
    int st=1,dr=MAX,mid,r;
    while(st<=dr){
        mid=(st+dr)/2;
        bool result=smaller(mid);
        if(result)
            dr=mid-1;
        else{
            r=mid;
            st=mid+1;
        }

    }
    return r;
}