#include<iostream>
#include<cstdio>
#include<string>
#include<map>
#include<algorithm>
#include<queue>
#include <functional>
using namespace std;
int saiki(int n){
  int m;
  if(n == 0){
    return 1;
  }
  m = saiki(n-1);
  return n*m;
}

int main(){
  int n,ans;
  cin >> n;
  ans = saiki(n);
  cout << ans << endl;
}