/*大数阶乘*/ #include <bits/stdc++.h> using namespace std; typedef long long LL; #define N 100005 inline int read(){ int s=0,w=1; char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();} while(ch>='0'&&ch<='9'){s=s*10+ch-'0';ch=getchar();} return s*w; } int qy[N]={1}; int main() { int n=read(); int l=1,h=0; for(int i=2;i<=n;i++) { for(int j=1;j<=l;j++) { int temp=qy[j-1]*i+h; qy[j-1]=temp%10; h=temp/10; } while(h) { l++; qy[l-1]=h%10; h/=10; } } for(int i=l-1;i>=0;i--) cout<<qy[i]; cout<<endl; }