#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <string>
#include <map>
#include <functional>
#include <cmath>
#include <cstdio>
using namespace std;

int ans = 1;

int Factional(int n){
  if(n == 1)return 1;
  else{
    return ans = n * Factional(n - 1);
  }
}

int main(){
  int n;
  cin >> n;
  Factional(n);
  cout << ans << endl;
}