#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize(4)
using namespace std;
const int N = 1e5 + 5;
const int MOD = 1e9 + 7;
long long inv[N], f[N];
int n;
int main() {
  scanf("%d", &n);
  inv[1] = 1;
  for (int i = 2; i <= n; ++i) inv[i] = (MOD - MOD / i) * inv[MOD % i] % MOD;
  long long ans = 1;
  for (int i = n; i >= 2; --i) {
    f[i] = (n / i) * inv[n - n / i] % MOD;
    for (int j = i + i; j <= n; j += i) f[i] = (f[i] - f[j]) % MOD;
    ans = (ans + f[i]) % MOD;
  }
  ans = (ans + MOD) % MOD;
  printf("%lld\n", ans);
  return 0;
}
