n = int(input()) def mod(n): return n % (10**9 + 7) dp = [[0]*3]*(n+1) dp[1][0] = 0 dp[1][1] = 1 dp[1][2] = 0 for i in range(1, n): dp[i+1][0] = mod(dp[i][1] + dp[i][2]) dp[i+1][1] = mod(dp[i][0]) dp[i+1][2] = mod(dp[i][1]) print(mod(dp[n][0] + dp[n][1] + dp[n][2]))