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