#include int dp[100000000]; int main(void){ unsigned long int n,i,x; scanf("%ld",&n); for(i=1,x=1;i<=n;i++){ x=x*i%1000000000000; } printf("%ld\n",x); }