func_code_string: #include <bits/stdc++.h>   using namespace std;   constexpr int kN = int(1E7 + 10);   vector<long long int> prime;   int l[kN], mu[kN], s[kN];   long long int n;   void pre() {     mu[1] = 1;     for (int i = 2; i <= n; i++) {       if (l[i] == 0) {         mu[i] = -1;         prime.push_back(l[i] = i);       }       for (int j : prime) {         if (i * j > n) break;         l[i * j] = min(l[i], j);         if (i % j == 0) {           mu[i * j] = 0;           break;         } else           mu[i * j] = -mu[i];       }     }     for (int i = 2; i <= n; i++) s[l[i]]++;     for (int i = 3; i <= n; i++) s[i] += s[i - 1];     return;   }   int main() {     long long int ans = 0, one = 0, two = 0, three = 0, zero = 0, cnt = 1;     scanf( %lld , &n);     pre();     for (int k = 1; k <= n; k++) one += mu[k] * (n / k) * (n / k);     one = n * (n - 1) / 2 - (one >> 1);     for (long long int i : prime)       if (i * i < n)         continue;       else if ((i << 1) > n)         cnt++;       else if (i > n / i)         three += s[i - 1] - s[n / i];     zero = (((n - 1) + (n - cnt)) * cnt) >> 1;     two = n * (n - 1) / 2 - zero - one - three;     ans = one + two * 2 + three * 3;     printf( %lld n , ans);   }   