#include <bits/stdc++.h>
#include "Guess.h"

using namespace std;

int find_number(int MAX)
{
    int r,pas;
    r=0;
    pas=(1<<int(log2(MAX)));
    while(pas)
    {
        if (r+pas<=MAX && smaller(r+pas))
            r+=pas;
        pas=pas/2;
    }
    return r+1;
}
