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;
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
const long long MOD = 1000000007;
const int MAX_N = 1000010;
int n;
int divi[MAX_N];
long long fact[MAX_N];
vector<int> curOrder;
long long ans = 0;
long long mpow(long long base, long long exp) {
  if (exp == 0) return 1;
  long long res = mpow(base, exp / 2);
  res *= res;
  res %= MOD;
  if (exp % 2 == 1) {
    res *= base;
    res %= MOD;
  }
  return res;
}
long long inv(long long k) { return mpow(k, MOD - 2); }
vector<int> pri(int k) {
  vector<int> res;
  while (k != 1) {
    res.push_back(divi[k]);
    k /= divi[k];
  }
  return res;
}
long long binom(int a, int b) {
  long long res = fact[a];
  res *= inv(fact[b]);
  res %= MOD;
  res *= inv(fact[a - b]);
  res %= MOD;
  return res;
}
void hello() {
  vector<int> v(1, 1);
  int cur = 1;
  for (int i = 0; i < (int)curOrder.size(); i++) {
    cur *= curOrder[i];
    v.push_back(cur);
  }
  reverse(v.begin(), v.end());
  vector<int> stuff;
  vector<bool> done(n + 1);
  for (int i = 0; i < (int)v.size(); i++) {
    int cnt = 0;
    for (int j = v[i]; j <= n; j += v[i]) {
      if (!done[j]) {
        done[j] = 1;
        cnt++;
      }
    }
    stuff.push_back(cnt);
  }
  long long res = 1;
  for (int i = 0; i < (int)stuff.size(); i++) {
    res *= stuff[i];
    res %= MOD;
    stuff[i]--;
  }
  int numAfter = 0;
  for (int i = ((int)stuff.size()) - 1; i >= 0; i--) {
    res *= (fact[stuff[i]] * binom(stuff[i] + numAfter, numAfter)) % MOD;
    res %= MOD;
    numAfter += stuff[i];
    numAfter++;
  }
  ans += res;
  ans %= MOD;
}
void getCount(multiset<int> v) {
  if ((int)v.size() == 0) {
    hello();
  } else {
    set<int> nums;
    for (int x : v) nums.insert(x);
    for (int x : nums) {
      curOrder.push_back(x);
      v.erase(v.find(x));
      getCount(v);
      v.insert(x);
      curOrder.pop_back();
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  for (int i = 2; i < MAX_N; i++) {
    if (divi[i] == 0) {
      for (int j = i; j < MAX_N; j += i) {
        divi[j] = i;
      }
    }
  }
  fact[0] = 1;
  for (int i = 1; i < MAX_N; i++) fact[i] = (fact[i - 1] * i) % MOD;
  cin >> n;
  int need = 0;
  while ((1 << (need + 1)) <= n) need++;
  for (int i = 1; i < n + 1; i++) {
    vector<int> v = pri(i);
    if ((int)v.size() == need) {
      multiset<int> second;
      for (int x : v) second.insert(x);
      getCount(second);
    }
  }
  return cout << ans << '\n', 0;
  ;
}
