#include #include typedef long long int ln; void run(void){ ln n; scanf("%lld",&n); const ln m=1000000000000LL; ln ans=1; int k=1; while(k<=n && ans>0){ ans=ans*k%m; k++; } if(ans==0){ printf("000000000000\n"); } else { printf("%lld\n",ans); } return; } int main(void){ run(); return 0; }