from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline N = int(input()) mod = 10**9 + 7 dp = [[0]*(N+1) for _ in range(4)] dp[1][1] = 1 for i in range(2,N+1): dp[0][i] = (dp[1][i-1] + dp[2][i-1])%mod dp[1][i] = (dp[0][i-1])%mod dp[2][i] = dp[1][i-1]%mod print(sum(dp[j][-1] for j in range(4))%mod)