#include #define ff first #define ss second #define mp make_pair #define pb push_back using namespace std; typedef pair pii; typedef pair piii; typedef long long ll; typedef pair pll; bool isPrime[1000005]; std::vector primes; void init() { for(int i=2; i*i<=1e6; ++i) { if(isPrime[i]==false) { for(int j=2*i; j<=1e6; j+=i) { isPrime[j] = true; } } } for(ll i=2; i<=1e6; ++i) if(isPrime[i]==false) { primes.pb(i); } } int main() { int n; cin>>n; init(); ll ans = 0; for(int i=0; i>x; ll temp = x; for(int j=0; j