#include <cstdio>
#include <iostream>
#include <math.h>

using namespace std;

int kaizyou(int n,int sum);

int n;
int ans=1;

int main(){
	cin >> n;

	kaizyou(n,ans);
	cout << ans << endl;
}

int kaizyou(int n,int sum){
	if(n > 1){
		ans = sum * n;
		kaizyou(n - 1,ans);
	}

}