#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>
#include<iomanip>
 
#define EPS (1e-10)
using namespace std;
#define PI (3.1415926535)
 
long long f(int n){
    if(n == 1)return 1;
    return n*f(n-1);
}
 
int main(){
    int n;
    cin >> n;

    cout << f(n) << endl;
 
    return 0;
}