n = int(input()) a = 1 sum_odd, sum_even = 1, 0 mod = 10**9+7 if n > 1: for i in range(n): if (i+1) % 2 == 0: a = (i+1) * sum_odd sum_even += (a%mod) else: a = (i+1) * sum_even sum_odd += (a%mod) print(a%mod)