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) {
        int 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 Integer.toString(x);
    }
}