# No.314 ケンケンパ def main(): N = int(input()) MOD = 10 ** 9 + 7 # dp[i][j] := count on j-th position doing movement i dp = [[0] * N for _ in range(3)] dp[0][0] = 1 for i in range(1, N): dp[0][i] = dp[2][i - 1] # ケン dp[1][i] = dp[0][i - 1] # ケンケン dp[2][i] = (dp[0][i - 1] + dp[1][i - 1]) % MOD # パー ans = (dp[0][-1] + dp[1][-1] + dp[2][-1]) % MOD print(ans) if __name__ == "__main__": main()