#include"iostream" #include"algorithm" #include"cstring" #include"cstdio" #include"cmath" #include"vector" #include"map" #include"set" #include"queue" usingnamespace std; #define MAXN 1000006 //#define int long long #define rep(i, a, b) for (int i = (a), i##end = (b); i <= i##end; ++i) #define per(i, a, b) for (int i = (a), i##end = (b); i >= i##end; --i) #define pii pair<int,int> #define fi first #define se second #define mp make_pair #define pb push_back #define eb emplace_back #define vi vector<int> #define all(x) (x).begin() , (x).end() #define mem( a ) memset( a , 0 , sizeof a ) typedeflonglong ll; int n , m;
int mu[MAXN] , pri[MAXN] , en; voidsieve( ){ mu[1] = 1; for( int i = 2 ; i < MAXN ; ++ i ) { if( !pri[i] ) pri[++ en] = i , mu[i] = -1; for( int j = 1 ; j <= en && pri[j] * i < MAXN ; ++ j ) { pri[i * pri[j]] = 1; if( i % pri[j] == 0 ) { mu[i * pri[j]] = 0; break; } mu[i * pri[j]] = -mu[i]; } } }
boolchk( ll x ){ ll re = 0; for( ll i = 1 ; i * i <= x ; ++ i ) if( mu[i] ) re += x / ( i * i ) * mu[i]; return re < n; }
voidsolve(){ cin >> n; ll l = 0 , r = 3e9 , mid; while( l <= r ) { mid = l + r >> 1; if( chk( mid ) ) l = mid + 1; else r = mid - 1; } cout << l << endl; }