#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

bool smaller(int x);

int find_number(int MAX)
{
    ll mini = 1, maxi = MAX;
    while (mini < maxi)
    {
        ll mid = (mini + maxi + 1) / 2;
        bool s = smaller(mid);
        if (s)
        {
            maxi = mid - 1;
        }
        else
        {
            mini = mid;
        }
    }
    return mini;
}