n = int(input()) dp = [0]*4 for i in range(n): if i == 0: dp[0]=1 continue dp[0], dp[1], dp[2] = dp[2], dp[0], dp[0]+dp[1] print(sum(dp)%(10**9+7))