N = int(raw_input()) MOD = 1000000000 + 7 a = 1 b = 0 c = 0 d = 0 e = 0 f = 0 for i in range(1,N + 1): #dp[i][1] = (dp[i][1] + dp[i - 1][0]) % MOD b = (b + a) % MOD #dp[i][2] = (dp[i][2] + dp[i - 1][1]) % MOD d = (d + c) % MOD #dp[i][0] = (dp[i][0] + dp[i - 1][1]) % MOD e = (e + c) % MOD #dp[i][0] = (dp[i][0] + dp[i - 1][2]) % MOD e = (e + f) % MOD a = e c = b f = d e = 0 b = 0 d = 0 ans = (a + c + f) % MOD #for i in range(3): #ans = (ans + dp[N][i]) % MOD print ans