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


int find_number( int up ) {
    int st , dr , mij , ok;
    st = 0;
    dr = up + 1;
    //cout << st << ' ' << dr << '\n';
    while( dr - st > 1 ) {
        mij = ( st + dr ) / 2;
        ok = smaller( mij );
        //cout << ok << ' ' << mij << '\n';
        if( ok )
            st = mij;
        else
            dr = mij;
    }
    return dr;
}
