#include #include void run(void){ int n; scanf("%d",&n); const int mod=1000000007; int *ken=(int *)calloc(n+1,sizeof(int)); int *kenken=(int *)calloc(n+1,sizeof(int)); int *pa=(int *)calloc(n+1,sizeof(int)); ken[1]=1; int i; for(i=2;i<=n;i++){ ken[i]=pa[i-1]; kenken[i]=ken[i-1]; pa[i]=(ken[i-1]+kenken[i-1])%mod; } printf("%d\n",((ken[n]+kenken[n])%mod+pa[n])%mod); free(ken); free(kenken); free(pa); return; } int main(void){ run(); return 0; }