#include #include #include #include #include #include using namespace std; #define int long long #define rep(i,n) for(int i = 0; i < (n); i++) #define endl "\n" const long long INF = (long long)1e18; const long long MOD = (long long)1e9 + 7; string yn(bool f){return f?"Yes":"No";} string YN(bool f){return f?"YES":"NO";} #define MAX #define MAX_PN 510000 bool PN[MAX_PN+2]; void huga(int t, int x){ if(PN[t]) return; for(int i = t*t; i <= x; i+=t) PN[i] = true; } void Sieve_of_Eratosthenes(int x){ PN[0]=PN[1]=PN[4]=true; for(int i = 6; (i-1)*(i-1) <= x; i+=6) huga(i-1,x),huga(i+1,x); for(int i = 6; i <= x; i+=6) PN[i]=PN[i+2]=PN[i+3]=PN[i+4]=true; } signed main(){ cin.tie(0); ios::sync_with_stdio(false); cout< square; cin>>N; Sieve_of_Eratosthenes(N+10); for(int i = 1; i*i <= N; i++){ if(PN[i] == false) square.push_back(i*i); } for(int i = 0; i < square.size(); i++){ for(int j = 2; j < square[i]; j++){ int k = square[i] - j; if(j > N || k > N) continue; if(PN[j] == false && PN[k] == false) count++; } } cout<