#include<guess.h>
#include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
#include<math.h>
#include<string>
#include <set>
#include<unordered_map>
#include<map>
#include<numeric>
#include<unordered_set>
#include<bit>
#include<iomanip>
#include<cstdint>
#include<sstream>
#include<queue>
#include<cstring>
#include<stack>
#include<functional>
#include<random>
#include<chrono>
#include<ctime>
#include<stdio.h>
#include<bitset>
#include<array>
#include<deque>


using namespace std;



//#define int long long
#define ll long long
#define ull unsigned long long
#define ui unsigned int
#define db long double
#define ld long double
#define for0(i, n) for (int i = 0; i < (n); ++i)
#define for1(i, n) for (int i = 1; i < (n); ++i)
#define rfor0(i, n) for (int i = (n) - 1; i >= 0; --i)
#define rfor1(i, n) for (int i = (n) - 1; i >= 1; --i)
#define cin1(a) for(int i=1;i<a.size();i++) cin>>a[i];
#define cin(a) for(auto &now:a) cin>>now;
#define all(a) a.begin(), a.end()
#define allr(a) a.rbegin(), a.rend()
#define chmin(a,b) a = min(a,b)
#define chmax(a,b) a = max(a,b)
#define print(a, s) for(auto i:a) cout<<i<<s;
#define ve vector
#define pii pair<int,int>
#define tiii tuple<int,int,int>
#define tiiii tuple<int,int,int,int>
#define tiiiii tuple<int, int, int, int, int>
#define vi vector<int>
#define vll ve<ll>
#define vvi vector<vi>
#define ret return
#define LOCAL
//#define sqr(x) x*x
//template <typename T>
mt19937 rnd(52);
const int N = 2e5 + 10, M = 676767677;
bool smaller(int x);
int find_nubmer(int mx) {
	int l = 1, r = mx + 1;
	while (l + 1 < r) {
		int m = (l + r) / 2;
		if (smaller(m)) r = m;
		else l = m;
	}
	return l;
}

