#include<stdio.h> #include<string.h> #define max 8001 unsigned n,a[max]; int main() { while(~scanf("%d",&n)) { int i,j; memset(a,0,sizeof(a)); for(i=2,a[0]=1;i<=n;i++) { for(j=0;j<max;j++) a[j]*=i; for(j=0;j<max;j++) { a[j+1]+=a[j]/100000; a[j]%=100000; } } for(i=max-1;i>=0&&!a[i];i--); printf("%d",a[i--]); for(;i>=0;i--) printf("%05d",a[i]); printf("\n"); } return 0; }