# -*- coding: utf-8 -*- """ No.554 recurrence formula https://yukicoder.me/problems/no/554 """ import sys from sys import stdin input = stdin.readline def solve(n): mod = 10**9 + 7 ans = 1 odd_sum = 1 even_sum = 0 for i in range(2, n+1): if i % 2 == 0: ans = i * odd_sum % mod even_sum += ans else: ans = i * even_sum % mod odd_sum += ans return ans def main(args): n = int(input()) ans = solve(n) print(ans) if __name__ == '__main__': main(sys.argv[1:])