MOD = 10**9+7 N = int(input()) if N==1: print(1) elif N==2: print(1) else: dp = [[0 for _ in range(4)] for _ in range(N+1)] for j in range(1,4): dp[N][j] = 1 for i in range(N-1,0,-1): if i<=N-2: dp[i][1] = dp[i+2][2] if i>=3: dp[i][3] = dp[i+2][2] if i<=N-3: dp[i][1] = (dp[i][1]+dp[i+3][3])%MOD if i>=2: dp[i][2] = dp[i+3][3] if i>=2: dp[i][2] = (dp[i+1][1]+dp[i][2])%MOD if i>=3: dp[i][3] = (dp[i+1][1]+dp[i][3])%MOD print((dp[1][1]+dp[2][2]+dp[3][3])%MOD)