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. 

import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.lang.*;
import java.util.Comparator;

public class ai {
    InputStream is;
    PrintWriter out;
    long mod = (long)(1e9 + 7), inf = (long)(3e18);
    int cnt[];
    void solve() throws IOException {
        int n = ni();
        long ans = 1l;
        for(long i=1;i<=n;i++){
            ans = (ans * i)%1000000007l;
        }
//        System.out.println(pow(2,n,1000000007));
        ans =( ans - pow(2,n-1,1000000007) + 1000000007)%1000000007;
        System.out.println(ans);
    }public long gcd(long a,long b){
        if(a%b==0)return b;
        return gcd(b,a%b);
    }
    public long pow(long a,long b,int c){
        if(b==1)return a%c;
        long x = pow(a,b/2,c);
        if(b%2==0){
            return (x*x)%c;
        }
        else{
            return (((x*x)%c)*a)%c;
        }
    }
    public void test(String x){
        x += "A";
        System.out.println(x);
    }
    public void build(long arr[],long brr[],int a[],int n,int l,int r){
        if(l==r){
            arr[n] = brr[n] = a[l];
        }
        else{
            int mid = (l+r)/2;
            build(arr,brr,a,2*n,l,mid);
            build(arr,brr,a,2*n+1,mid+1,r);
            arr[n] = arr[2*n] + arr[2*n+1];
            brr[n] = Math.max(brr[2*n],brr[2*n+1]);
        }
    }
    public long sum(long arr[],int l,int r,int n,int start,int end){
        if(start>end)return 0;
        if(l==start && r==end){
            return arr[n];
        }
        int mid = (l+r)/2;
        return sum(arr,l,mid,2*n,start,Math.min(end,mid)) + sum(arr,mid+1,r,2*n+1,Math.max(mid+1,start),end);
    }
    public void increment(long arr[],long brr[],int n,int l,int r,int tl,int tr,HashMap<Long,Integer> map){
        if(l>r)return;
        if(l==r && tl==tr){
            arr[n] = map.get(arr[n]);
            brr[n] = map.get(brr[n]);
        }
        else{
            int mid = (tl+tr)/2;
            if(brr[2*n]>2)
            increment(arr,brr,2*n,l,Math.min(r,mid),tl,mid,map);
            if(brr[2*n+1]>2)
            increment(arr,brr,2*n+1,Math.max(l,mid+1),r,mid+1,tr,map);
            arr[n] = arr[2*n] + arr[2*n+1];
            brr[n] = Math.max(brr[2*n],brr[2*n+1]);
        }
    }
    public int[] sieve(int n){
        int []ans = new int[n];
        ans[1]=1;
        int i=2;
        while(i<n){
            if(ans[i]==0){
                int j=2*i;
//                ans[i]=i;
                while(j<n){
                    if(ans[j]==0)
                        ans[j] = i;
                    j+=i;
                }
            }
            i++;
        }
        return ans;
    }
    public static void main(String[] args)throws Exception { new ai().run(); }
    void run() throws Exception {
//        is = new FileInputStream("C:\\Users\\compute\\Desktop\\input.txt");
        is = System.in;
        out = new PrintWriter(System.out);
        solve();
        out.flush();
    }

    byte input[] = new byte[1024];
    int len = 0, ptr = 0;

    int readByte() {
        if(ptr >= len) { ptr = 0;
            try { len = is.read(input); }
            catch(IOException e) { throw new InputMismatchException(); }
            if(len <= 0) { return -1; }
        } return input[ptr++];
    }
    boolean isSpaceChar(int c) { return !( c >= 33 && c <= 126 ); }
    int skip() {
        int b = readByte();
        while(b != -1 && isSpaceChar(b)) { b = readByte(); }
        return b;
    }

    char nc() { return (char)skip(); }
    String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while(!isSpaceChar(b)) { sb.appendCodePoint(b); b = readByte(); }
        return sb.toString();
    }
    String nLine() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while( !(isSpaceChar(b) && b != ' ') ) { sb.appendCodePoint(b); b = readByte(); }
        return sb.toString();
    }
    int ni() {
        int n = 0, b = readByte();
        boolean minus = false;
        while(b != -1 && !( (b >= '0' && b <= '9') || b == '-')) { b = readByte(); }
        if(b == '-') { minus = true; b = readByte(); }
        if(b == -1) { return -1; }  //no input
        while(b >= '0' && b <= '9') { n = n * 10 + (b - '0'); b = readByte(); }
        return minus ? -n : n;
    }
    long nl() {
        long n = 0L;    int b = readByte();
        boolean minus = false;
        while(b != -1 && !( (b >= '0' && b <= '9') || b == '-')) { b = readByte(); }
        if(b == '-') { minus = true; b = readByte(); }
        while(b >= '0' && b <= '9') { n = n * 10 + (b - '0'); b = readByte(); }
        return minus ? -n : n;
    }

    double nd() { return Double.parseDouble(ns()); }
    float nf() { return Float.parseFloat(ns()); }
    int[] na(int n) {
        int a[] = new int[n];
        for(int i = 0; i < n; i++) { a[i] = ni(); }
        return a;
    }
    char[] ns(int n) {
        char c[] = new char[n];
        int i, b = skip();
        for(i = 0; i < n; i++) {
            if(isSpaceChar(b)) { break; }
            c[i] = (char)b; b = readByte();
        } return i == n ? c : Arrays.copyOf(c,i);
    }
}