# -*- coding: utf-8 -*- import sys N = int(input()) M = 10**9 + 7 dp = [0] * (10**5 + 1) def recurrence(n): if n==1: dp[n] = 1 elif n==2: dp[n] = 2 elif n==3: dp[n] = 6 elif n==4: dp[n] = 28 else: dp[n] = ( n*(dp[n-2]//(n-2) + dp[n-1]) ) % M ''' for i in range(n-1, 0, -2): dp[n] += dp[i] % M dp[n] *= n dp[n] %= M ''' return dp[n] sys.setrecursionlimit(10**5+1) for i in range(1, N+1): recurrence(i) print(dp[N])