#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    ll n, ans = 1;
    cin >> n;
    while(n>0){
        ans *= n--;
    }
    cout << ans << endl;
    return 0;
}   

