N=int(input()) dp = [[0]*3 for _ in range(N+1)] dp[1][0]=1 if N>=2: dp[2][1]=1 if N>=3: dp[3][2]=1 mod=10**9+7 for i in range(0,N): for j in range(3): for jj in range(3): if j==jj: continue if i+jj+1>N: break dp[i+jj+1][jj]+=dp[i][j] dp[i+jj+1][jj]%=mod print(sum(dp[-1])%mod)