#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  ll n, ans = 1;
  cin >> n;
  while (n > 1) ans *= n--;
  cout << ans << endl;

  return 0;
}
