package step2;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int a = input.nextInt();
input.close();
int b = fact(a);
System.out.print(b);
}
/********* Begin *********/
/********* End *********/
}