*a="M#O9`7p%?y";long n,x;main(){scanf("%ld",&n);for(n<1e9+7?x=a[n/' !']:0;n%' !';)x=x*n--%';';printf("%d",x);}