public class jiecheng {
static int result=1;
public static int jiecheng(int n) {
if (n==1) {
return 1;
}
else
return n*jiecheng(n-1);
// if (n>0) {
// result = result*n;
//
// n--;
//
// jiecheng(n);
// }else {
// return result;
// }
}
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
// System.out.println(a);
int b = jiecheng(a);
System.out.println(b);
sc.close();
}
}