#include"bits/stdc++.h" #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") using namespace std; #define ALL(x) begin(x),end(x) #define rep(i,n) for(int i=0;i<(n);i++) #define debug(v) cout<<#v<<":";for(auto x:v){cout<bool chmax(T &a,const T &b){if(abool chmin(T &a,const T &b){if(b ostream &operator<<(ostream &os,const vector&v){ for(int i=0;i<(int)v.size();i++) os< istream &operator>>(istream &is,vector&v){ for(T &x:v)is>>x; return is; } vector V(50000010),cnt(50000010,0); signed main(){ int N;cin>>N; iota(begin(V),begin(V)+N+1,0); for(int i=2;i*i*i*i<=N;i++)if(V[i]==i){ int k=i*i*i*i; for(int j=i*i*i*i;j<=N;j+=i)while(V[j]%k==0) V[j]/=k; } for(int i=2;i*i<=N;i++)if(V[i]==i){ int k=i*i; for(int j=i*i;j<=N;j+=i)while(V[j]%k==0) V[j]/=k; } ll ans=0; for(int i=1;i<=N;i++){ ans+=2ll*cnt[V[i]]+1; cnt[V[i]]+=1; } cout<