N = int(input()) dp = [[0] * 3 for i in range(N + 1)] dp[0][2] = 1 DIV = 10 ** 9 + 7 for i in range(N): dp[i + 1][0] += dp[i][2] dp[i + 1][1] += dp[i][0] dp[i + 1][2] += (dp[i][0] + dp[i][1]) for c in range(3): dp[i + 1][c] %= DIV print(sum(dp[-1]) % DIV)