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 int MOD = 1000000007;
const double pi = atan(1.0) * 4.0;
const double eps = 1e-8;
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
int bc(int n) { return n ? bc((n - 1) & n) + 1 : 0; }
const int N = 1000005;
int i, j, k, m, n;
int ans;
long long modpow(long long x, long long n) {
  if (n == 0) return 1;
  long long y = modpow(x, n / 2);
  y = (y * y) % MOD;
  if (n & 1) y = (y * x) % MOD;
  return y;
}
const int MAXN = 1000001;
long long f[MAXN], rf[MAXN];
long long ways[N];
int len[N];
int lastp[N];
int pn, p[N];
int main() {
  f[0] = rf[0] = 1;
  for (int i = 1; i <= 1000000; i++) {
    f[i] = (f[i - 1] * i) % MOD;
    rf[i] = modpow(f[i], MOD - 2);
  }
  int tn = 1;
  for (int tt = 1; tt <= tn; tt++) {
    cin >> n;
    for (int i = 2; i <= n; i++)
      if (lastp[i] == 0) {
        lastp[i] = i;
        for (int j = i + i; j <= n; j += i) {
          lastp[j] = i;
        }
      }
    ways[1] = 1;
    int mx = 0;
    for (int i = 2; i <= n; i++) {
      pn = 0;
      int x = i;
      while (x != 1) {
        int l = lastp[x];
        p[pn++] = l;
        while (x % l == 0) len[i]++, x /= l;
      }
      for (int k = 0; k < pn; k++) {
        long long g = i / p[k];
        long long nums = n / g - n / i;
        long long places = n - n / g;
        long long poss = nums * f[places + nums - 1] % MOD * rf[places] % MOD;
        ways[i] = (ways[i] + ways[g] * poss) % MOD;
      }
      if (len[i] > mx) mx = len[i];
    }
    long long ans = 0;
    for (int i = 1; i <= n; i++)
      if (len[i] == mx) {
        ans = (ans + ways[i]) % MOD;
      }
    cout << ans << endl;
  }
  return 0;
}
