n=int(input()) if n==1:print(1) elif n==2 or n==3:print(2) else: k=kk=kkk=1 for i in range(n-3): t=k k=kk+kkk kkk=kk kk=t print((k+kk)%1000000007)