import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); scan.close(); long d = 1000000000 + 7; long s1 = 1; long s2 = 0; long a = 1; for(int i = 2; i <= n; i++) { if(i % 2 == 0) { a = i * s1 % d; s2 += a % d; }else { a = i * s2 % d; s1 += a % d; //System.out.println(s2); } } a = a % d; System.out.println(a); } }