#include<stdio.h>
#include<iostream>
using namespace std;
int ke(long long int x)
{
    if(x == 1)return 1;
    else return x*ke(x-1);
}
int main()
{
    long long int a;
    cin >> a;
    printf("%d\n",ke(a));
    return 0;
}