/*
编写一个方法,求整数n的阶乘,例如5的阶乘是1*2*3*4*5
*/
public class Test1
{
  public static void main(String[] args){
    java.util.Scanner s = new java.util.Scanner(System.in);
    int i = s.nextInt();
    int n;
    n = Test1.Factorial(i);
    System.out.println(n);
  }
  public static int Factorial(int i){
    int sum = 1;
    for(int j = 1;j <= i;j++)
      sum *= j;
    return sum;
  }
}