#include using namespace std; using LL=long long; using ULL=unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) const ULL M=1000000007,D=1<<25, T[] = { 1,361946029,117175975,532814826, 638916270,709912685,565479858,534784668, 864357307,580002085,988122582,626052914, 711403642,930569788,928062158,782871805, 373979365,75908005,861919911,973727253, 963971145,892153437,976333508,204474745, 183143523,224645330,885152995,514060757, 894672548,683957845 }; int main(){ ULL x=0; ULL ans=0; char c; while(c=getchar(),'0'<=c&&c<='9'&&x<1<<30) x=x*10+c-'0'; x=min(x-1,M); ans=T[x/D]; rep(i,x%D) ans=M-ans*(x-i)%M; cout<