#include <iostream>

using namespace std;

int main(int argc, char *argv[]) {
  int n, result;
  cin >> n;
  result = n;

  for (int i = 1; i < n; i++)
    result *= i;

  cout << result;
  return 0;
}