n = int(input()) c = [1,2,2] if n > 3: for i in range(4,n+1): c.append(c[i-3]+c[i-4]) print(c[-1]%((10**9)+7)) else: print(c[n-1])