n=int(input()) dp=[1,0,0] for i in range(n):dp=[dp[1]+dp[2],dp[0],dp[1]] print(sum(dp)%1000000007)