# include using namespace std; int n,a[50000005],c[50000005],maxn=5*1e7,res; bool b[50000005]; void sang() { for (int i = 1; i <= maxn; i++) { b[i] = true; a[i] = i; } b[1] = false; for (int i = 2; i <= sqrt(maxn); i++) { if (b[i]) { for (int j = i*i; j <= maxn; j+= i) { b[j] = false; } for (int j = i*i; j <= maxn; j+=i*i) { while (a[j] % (i*i) == 0) { a[j] /= (i*i); } } } } } int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n; sang(); for (int i = 1; i <= n; i++) { c[a[i]]++; } for (int i = 1; i <= n; i++) { res += (c[i]*c[i]); } cout << res; }