# 直前の2ムーブ[KK, KP, PK]で数え上げる N = int(input()) mod = 10**9+7 dp = [[0]*3 for i in range(max(N, 2)+1)] # 1歩目はK dp[2][0] = 1 dp[2][1] = 1 dp[2][2] = 0 for i in range(3, N+1): dp[i][0] += dp[i-1][2] dp[i][1] += dp[i-1][0]+dp[i-1][2] dp[i][2] += dp[i-1][1] dp[i][0] %= mod dp[i][1] %= mod dp[i][2] %= mod #print(dp[i]) ans = sum(dp[N])%mod if N == 1: print(1) else: print(ans)