int a[100000010]; int main() { int i,len,n; while(scanf("%d",&n)!=EOF){ a[1]=1; len=1; for(int k=2;k<=n;k++){ for(i=1;i<=len;i++){ a[i]=a[i]*k; } for(i=1; i<=len; i++) { if(a[i]>=10) { a[i+1]+=a[i]/10; a[i]%=10; } } while(a[len+1]>0) { len++; a[len+1]=a[len]/10; a[len]=a[len]%10; } } for(i=len; i>=1; i--) printf("%d",a[i]); printf(" "); } return 0; }