#include <bits/stdc++.h>
using namespace std;
/* {{{ */
/*-------------------------------*/
struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);}} fast;

#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (b) - 1; i >= (a); i--)
#define REP(i, n) for(int i = 0; i < (n); i++)
#define rep(i, n) for(int i = 0; i < (n); i++)
#define RREP(i, n) for(int i = (n) - 1; i >= 0; i--)
#define rrep(i, n) for(int i = (n) - 1; i >= 0; i--)
 
#define all(i) (i).begin(),(i).end()
#define rall(i) (i).begin(),(i).end(),greater<int>()
#define CLEAR(ary, i) memset((ary), (i), sizeof(ary))
#define PB push_back
#define pb push_back
#define mp make_pair
#define FST first
#define SEC second
#define fst first
#define sec second

#define int long long

const int INF = 999999999;
const int MOD = 1e9 + 7;
const double PI = acos(-1);
const int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};

inline int in(){int x;std::cin>>x;return x;}

typedef long long ll;
typedef pair<int, int> pint;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef vector<long long> llv;
typedef vector<pint> vpint;
typedef queue<int> qint;
typedef stack<int> si;
typedef deque<int> dint;

template <typename T> void print(T x) { std::cout << x << '\n'; }
/*-------------------------------*/
/* }}} */

int fact(int n)
{
  if (n == 0) return 1;

  return n * fact(n - 1);
}

signed main()
{
  int a = in();

  cout << fact(a) << '\n';

  return (0);
}