from enum import IntEnum, auto # ステート遷移 class E(IntEnum): K = 0 # ケン KK = auto() # ケンケン P = auto() # パ def nexts(self): match self: case E.K: return [E.KK, E.P] case E.KK: return [E.P] case E.P: return [E.K] assert False @staticmethod def states(): for fm in E: for to in fm.nexts(): yield fm, to MOD = 10 ** 9 + 7 N = int(input()) dp = [[0] * len(E) for _ in range(N)] dp[0][E.K] = 1 for i in range(N-1): for fm, to in E.states(): dp[i+1][to] += dp[i][fm] dp[i+1][to] %= MOD ans = sum(dp[N-1]) % MOD print(ans)