p = 10**9+7 N = input() dp = [0 for i in xrange(N+2)] dp[0] = 1 for i in xrange(N-1): dp[i+2] += dp[i]%p dp[i+3] += dp[i]%p print sum(dp[-4:N+1])%p