n=int(input()) if n==1:print(1) elif n==2 or n==3:print(2) else: n-=3 k=l=m=1 while n: t=k k=l+m m=l l=t k%=1000000007 n-=1 print((k+kk)%1000000007)