import sys import numpy as np read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines # N log N があるが N^2 で MOD = 10**9 + 7 N = int(read()) dp = np.array([1], np.int64) for n in range(2, N + 1): newdp = np.zeros(n, np.int64) if n & 1: newdp[:-1] = np.cumsum(dp[::-1])[::-1] else: newdp[1:] = np.cumsum(dp) dp = newdp % MOD x = 2 * dp.sum() % MOD if N <= 2: x = 0 print(x)