import sys readline=sys.stdin.readline N=int(readline()) mod=10**9+7 dp=[0,1,1] for i in range(3,N+1): dp.append((dp[-2]+dp[-3])%mod) ans=(dp[-1]+dp[-2])%mod print(ans)