A permutation of length n is an array consisting of n distinct integers from 1 to n in arbitrary order. For example, [2,3,1,5,4] is a permutation, but [1,2,2] is not a permutation (2 appears twice in the array) and [1,3,4] is also not a permutation (n=3 but there is 4 in the array).

Consider a permutation p of length n, we build a graph of size n using it as follows: 

  * For every 1 ≤ i ≤ n, find the largest j such that 1 ≤ j < i and p_j > p_i, and add an undirected edge between node i and node j 
  * For every 1 ≤ i ≤ n, find the smallest j such that i < j ≤ n and p_j > p_i, and add an undirected edge between node i and node j 



In cases where no such j exists, we make no edges. Also, note that we make edges between the corresponding indices, not the values at those indices.

For clarity, consider as an example n = 4, and p = [3,1,4,2]; here, the edges of the graph are (1,3),(2,1),(2,3),(4,3).

A permutation p is cyclic if the graph built using p has at least one simple cycle. 

Given n, find the number of cyclic permutations of length n. Since the number may be very large, output it modulo 10^9+7.

Please refer to the Notes section for the formal definition of a simple cycle

Input

The first and only line contains a single integer n (3 ≤ n ≤ 10^6).

Output

Output a single integer 0 ≤ x < 10^9+7, the number of cyclic permutations of length n modulo 10^9+7.

Examples

Input


4


Output


16

Input


583291


Output


135712853

Note

There are 16 cyclic permutations for n = 4. [4,2,1,3] is one such permutation, having a cycle of length four: 4 → 3 → 2 → 1 → 4.

Nodes v_1, v_2, …, v_k form a simple cycle if the following conditions hold: 

  * k ≥ 3. 
  * v_i ≠ v_j for any pair of indices i and j. (1 ≤ i < j ≤ k) 
  * v_i and v_{i+1} share an edge for all i (1 ≤ i < k), and v_1 and v_k share an edge. 
#include <bits/stdc++.h>
using namespace std;
long long modInverse(long long a, long long m) {
  long long m0 = m;
  long long y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long q = a / m;
    long long t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
long long power(long long x, long long y) {
  long long temp;
  if (y == 0) return 1ll;
  temp = power(x, y / 2) % 1000000007;
  ;
  if (y % 2 == 0)
    return (temp * temp % 1000000007);
  else {
    if (y > 0)
      return ((x * temp % 1000000007 * temp) % 1000000007);
    else
      return ((temp % 1000000007 * temp) % 1000000007) / x;
  }
}
long long powerm(long long x, long long y) {
  long long temp;
  if (y == 0) return 1;
  temp = power(x, y / 2);
  if (y % 2 == 0)
    return (temp * temp);
  else {
    if (y > 0)
      return (x * temp * temp);
    else
      return (temp * temp) / x;
  }
}
bool prime[200000 + 1];
void SieveOfEratosthenes() {
  memset(prime, true, sizeof(prime));
  prime[1] = false;
  for (int p = 2; p * p <= 200000; p++) {
    if (prime[p] == true) {
      for (int i = p * 2; i <= 200000; i += p) prime[i] = false;
    }
  }
}
vector<long long> bit;
void update(long long i, long long val, long long n) {
  for (; i <= n;) {
    bit[i] += val;
    i = i + (i & -i);
  }
}
long long gets(long long i, long long n) {
  long long s = 0;
  for (; i > 0;) {
    s += bit[i];
    i -= i & (-i);
  }
  return s;
}
vector<vector<long long> > dp, x;
long long f1(long long s, long long e, long long k) {
  if (s == e) return 0;
  if (dp[s][e] != -1) return dp[s][e];
  long long mi = x[s][e], to = 0;
  for (long long i = s; i < e; i++) {
    to = f1(s, i, k) + f1(i + 1, e, k) + k;
    mi = min(mi, to);
  }
  return dp[s][e] = mi;
}
long long fin(vector<long long>& v, long long n, long long k) {
  vector<vector<long long> > emp(n, vector<long long>(n, -1));
  dp = emp;
  x = emp;
  unordered_map<long long, long long> ma;
  for (long long i = 0; i < n; i++) {
    ma[v[i]]++;
  }
  long long to = k;
  for (auto i : ma)
    if (i.second > 1) to += i.second;
  unordered_map<long long, long long> x;
  unordered_map<long long, long long> emp2;
  long long temp = 0;
  for (__typeof(n) i = 0; i < n; i += 1) {
    long long p = v[i];
    if (x[p] > 2 && ma[p] > 2) {
      temp += 0;
    } else if (x[p] == 0 && ma[p] > 2) {
      temp += 1;
    } else if (x[p] == 0 && ma[p] == 2) {
      temp += 2;
    } else if (x[p] == 0 && ma[p] == 1) {
      temp += 0;
    } else if (x[p] == 1 && ma[p] == 1) {
      temp -= 1;
    } else if (x[p] == 1 && ma[p] == 2) {
      temp += 0;
    } else if (x[p] == 1 && ma[p] > 2) {
      temp -= 1;
    } else if (x[p] == 2 && ma[p] == 1) {
      temp -= 1;
    } else if (x[p] == 2 && ma[p] == 2) {
      temp++;
    } else if (x[p] == 2 && ma[p] > 2) {
      temp += 0;
    }
    if (temp >= k) {
      to -= temp - k;
      temp = 0;
      x.clear();
    } else
      x[p]++;
    ma[p]--;
  }
  return to;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  long long z = 1;
  long long p1 = 1;
  while (t--) {
    long long n;
    cin >> n;
    long long z = power(2, n - 1);
    long long p = 1;
    for (__typeof(n) i = 0; i < n; i += 1) {
      p *= (i + 1);
      p %= 1000000007;
    }
    cout << (p - z + 2 * (1000000007)) % 1000000007 << endl;
  }
}
