/* Use the BigInteger class from the java.math package */

import java.math.BigInteger;

class Fact {

   public static BigInteger fact(BigInteger n) 
     { 
	if (n.equals(BigInteger.ZERO)) 
	  return BigInteger.ONE;
	else
	  return n.multiply(fact(n.subtract(BigInteger.ONE)));
     }

   public static void main(String[] args) { 
        BigInteger r = fact(new BigInteger(args[0]));
	System.out.println (r.toString());
    }
}
