#pragma GCC optimize("Ofast") #pragma GCC target("avx2") #define MD 1000000007 int inverse(int a){ int b=MD; int u=1; int v=0; int s,t; while(b){ t=a/b; s=b; b=a-t*b; a=s; s=v; v=u-t*v; u=s; } if(u<0){ u+=MD; } return u; } int fact(int n){ long z=1; while(n){ z=(z*n--)%MD; } return z; } main(){ char rbuf[16]; read(0,rbuf,sizeof rbuf); char*rp=rbuf; int n=0; int c; while(c=*rp++-48,c>=0){ n=n*10+c; if(n>MD){ puts("0"); exit(0); } } --n; int f=n