#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
#include<string>
#include<tuple>
#include<utility>
#include<stack>
#include<queue>
#include<deque>
#include<set>
#include<iomanip>
#include<map>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
const int INF = 1e9 + 7;
int dx[8] = { 1,0,-1,0,1,1,-1,-1 };
int dy[8] = { 0,1,0,-1,1,-1,1,-1 };

ll solve(ll n) {
	if (n == 1) {
		return 1;
	}
	return n * solve(n - 1);
}


int main() {

	ll n;
	while (cin >> n) {

		cout << solve(n) << endl;
	}
	return 0;
}

