https://www.acmicpc.net/problem/10872
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int a=s.nextInt();
int num=1;
if(a==0) System.out.println(num);
else{
for(int i=1;i<=a;i++){
num=num*i;
}
System.out.println(num);
}
}
}