import math def nCr(n,r): f = math.factorial return f(n) / f(r) / f(n-r) N = input() MOD = 10**9 + 7 ans = 0 for i in xrange(N/2 + 1): #print i ans += nCr(i+(N-2*i)/3, i) ans %= MOD print ans