Let's define a function f(p) on a permutation p as follows. Let g_i be the [greatest common divisor (GCD)](https://en.wikipedia.org/wiki/Greatest_common_divisor) of elements p_1, p_2, ..., p_i (in other words, it is the GCD of the prefix of length i). Then f(p) is the number of distinct elements among g_1, g_2, ..., g_n.

Let f_{max}(n) be the maximum value of f(p) among all permutations p of integers 1, 2, ..., n.

Given an integers n, count the number of permutations p of integers 1, 2, ..., n, such that f(p) is equal to f_{max}(n). Since the answer may be large, print the remainder of its division by 1000 000 007 = 10^9 + 7.

Input

The only line contains the integer n (2 ≤ n ≤ 10^6) — the length of the permutations.

Output

The only line should contain your answer modulo 10^9+7.

Examples

Input


2


Output


1

Input


3


Output


4

Input


6


Output


120

Note

Consider the second example: these are the permutations of length 3:

  * [1,2,3], f(p)=1. 
  * [1,3,2], f(p)=1. 
  * [2,1,3], f(p)=2. 
  * [2,3,1], f(p)=2. 
  * [3,1,2], f(p)=2. 
  * [3,2,1], f(p)=2. 



The maximum value f_{max}(3) = 2, and there are 4 permutations p such that f(p)=2.
#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long maxn = 1e6 + 5;
long long n;
long long fac[maxn];
long long invfac[maxn];
long long binpow(long long x, long long p) {
  if (p == 0) return 1;
  if (p & 1) return x * binpow(x, p - 1) % mod;
  return binpow(x * x % mod, p >> 1);
}
long long inv(long long x) { return binpow(x, mod - 2); }
void precalc() {
  fac[0] = 1;
  for (long long i = 1; i < maxn; ++i) {
    fac[i] = fac[i - 1] * i % mod;
  }
  invfac[maxn - 1] = inv(fac[maxn - 1]);
  for (long long i = maxn - 2; i >= 0; --i) {
    invfac[i] = invfac[i + 1] * (i + 1) % mod;
  }
}
vector<long long> primes[maxn];
vector<long long> graph[maxn];
long long cntdiv[maxn];
long long dp[maxn];
bool good[maxn];
void precalc_primes() {
  for (long long i = 2; i <= n; ++i) {
    if (primes[i].empty()) {
      for (long long j = i; j <= n; j += i) {
        primes[j].push_back(i);
      }
    }
  }
  cntdiv[1] = 1;
  long long maxcnt = 1;
  for (long long i = 2; i <= n; ++i) {
    long long t = primes[i].back();
    cntdiv[i] = 1 + cntdiv[i / t];
    maxcnt = max(maxcnt, cntdiv[i]);
  }
  for (long long i = 1; i <= n; ++i) {
    if (cntdiv[i] == maxcnt) {
      good[i] = true;
    }
  }
  for (long long i = n; i >= 1; --i) {
    if (!good[i]) continue;
    for (auto p : primes[i]) {
      good[i / p] = true;
      graph[i / p].push_back(i);
    }
  }
}
void calc_dp(long long k) {
  if (!good[k]) return;
  if (graph[k].empty()) {
    dp[k] = 1;
    return;
  }
  for (auto to : graph[k]) {
    long long num = n / k - n / to;
    long long a = n - n / k;
    dp[k] += fac[a + num - 1] * invfac[a] % mod * dp[to] % mod * num;
    dp[k] %= mod;
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  precalc();
  cin >> n;
  precalc_primes();
  for (long long i = n; i >= 1; --i) {
    calc_dp(i);
  }
  cout << dp[1] << '\n';
}
