([-_-]?)
package com.javarush.task.task15.task1531;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StringBufferInputStream;
/*
Факториал
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int input = Integer.parseInt(reader.readLine());
reader.close();
System.out.println(factorial(input));
}
public static String factorial(int n) {
long x = 1;
if (n > 0 && n <= 150) {
for (int i = 1; i <= n; i++) {
x = x * i;
}
} else if (n < 0) {
x = 0;
} else if (n == 0) {
x = 1;
}
return Long.toString(x);
}
}