m=1e9+7,b,c,n,t;main(a){for(scanf("%d",&n);3+n--;a=(c+t)%m)t=c,c=b,b=a;t=!printf("%d",a);}