#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
const long long MOD = 1e9 + 7;
long long pow(long long a, long long b, long long m) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % m;
    b /= 2;
    a = (a * a) % m;
  }
  return ans;
}
long long modinv(long long k) { return pow(k, MOD - 2, MOD); }
long long mu[N], prime[N];
vector<long long> primes;
void precompute() {
  fill(prime + 2, prime + N, 1);
  mu[1] = 1;
  for (long long i = 2; i < N; i++) {
    if (prime[i]) primes.push_back(i), mu[i] = -1;
    for (auto &it : primes) {
      if (i * it >= N) break;
      prime[i * it] = 0;
      if (i % it == 0) {
        mu[i * it] = 0;
        break;
      } else
        mu[i * it] = mu[i] * mu[it];
    }
  }
}
long long n;
long long ans = 0;
double dans = 0;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  precompute();
  cin >> n;
  ans = 1, dans = 1;
  for (long long i = 2; i <= n; i++) {
    long long f = n / i;
    dans -= 1.0 * mu[i] * f / (n - f);
    ans -= (mu[i] * f * modinv(n - f)) % MOD;
    ans += MOD;
    ans %= MOD;
  }
  cout << ans;
  return 0;
}
