Go: package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)

	rs := 1
	for i := 1; i <= n; i++ {
		rs *= i
	}
	fmt.Println(rs)
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<map>
#include<queue>
#include<vector>
using namespace std;

int main() {
	int n, s = 1;
	cin >> n;
	while (n)s *= n--;
	cout << s << endl;
	return 0;
}

C++: #include <iostream>
using namespace std;

int main() {
  int n;
  long long x = 1;
  cin >> n;
  for (int i=2; i<=n; i++) {
    x *= i;
  }
  cout << x << endl;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#ifndef FAST_IO
 #define IOS ios_base::sync_with_stdio(false);cin.tie(nullptr);
#endif

#define FILE_IO freopen("input.txt","r",stdin)
#define int long long
#define f first
#define s second
#define endl '\n'
#define all(c) c.begin(),c.end()
#define bp __builtin_popcount
#define debug(x) cerr << #x << " = " << x << endl;

const int MOD = 1e9 + 7;
const int INF = 1e18;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <typename T>void print(T t){for(auto &it : t)cout<<it<<" ";}
inline int powerexp(int a, int b, int m = MOD){ int res = 1;while(b){if(b&1)res = res * a % m;a = a * a % m,b >>= 1;}return res % m;}
inline int modinv(int a){ return powerexp(a,MOD-2,MOD);}
inline int lcm(int a, int b){ int g = __gcd(a,b);return a/g*b;}
inline int add(int x, int y){ x += y; if (x >= MOD) x -=  MOD; return x;}
inline int mul(int x, int y){ return (x * 1ll * y) % MOD;}
inline int sub(int x, int y){ x -= y; if (x<0) x += MOD; return x ;}

//-------------------< start here >-------------------------// 

int fact(int n){
  int ret = 1;
  for(int i = 1; i <= n; i++)
   ret *= i;
  return ret;	
}

void solve(){
	int n;
	while(cin >> n){
	  cout << fact(n) << endl;	
    }
}

//-----------------------------
//comment from here for TOPCODER 
int32_t main(){
   IOS;
   solve();
   //find();
   #ifdef LOCAL_DEFINE
   cerr << "time elapsed " << (double)clock()/CLOCKS_PER_SEC << endl;
   #endif
}

C++: #define scanf_s scanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 81
#define _MAX 100
#define ABC 26
int main(void)
{
	int n;
	long long int ans;
	scanf_s("%d", &n);
	for (int i = 1; i <= n; ++i) {
		ans *= i;
	}
	printf("%lld\n", ans);
}

C++: #include <iostream>
#include <string>
#include <cmath>
using namespace std;

#define SAFE_DELETE( x ) { if ( x ){ delete x ; x = NULL; } }

struct tCell{
	char x;
	tCell* prev;
	tCell* next;
};

class myInt{
public:
	myInt( int d = 0 ) : digit( 0 ), head( NULL ), tail( NULL ){
		head = new tCell;
		tail = new tCell;
		head->x = tail->x = 0;
		head->prev = tail->next = NULL;
		head->next = tail;
		tail->prev = head;
		setFigure( d );
	}
	~myInt(){
		init();
		SAFE_DELETE( tail );
		SAFE_DELETE( head );
	}
	void getNumber( string& s ){
		s = numStr;
		for( unsigned int i = 0; i < numStr.size(); ++i ){
			s[ i ] += '0';
		}
	}
	int getDigit(){
		return digit;
	}

	tCell operator[]( int d ){
		if ( d >= digit ){
			tCell* cell = NULL;
			return *cell;
		}
		tCell* cell = head->next;
		for ( int i = 0; i < d; ++i ){
			cell = cell->next;
		}
		return *cell;
	}
	void operator=( int d ){
		setFigure( d );
	}
	void operator=( myInt& mi ){
		init();
		for ( int i = 0; i < mi.getDigit(); ++i ){
			pushBack( mi[ i ].x );
		}
	}
	void operator+=( myInt& mi ){
		int max = ( digit < mi.getDigit() ? mi.getDigit() : digit ) + 1;
		secureDigit( max );
		mi.secureDigit( max );
		tCell* cell = head;
		for ( int i = 0; i < max-1; ++i ){
			cell = cell->next;
			cell->x += mi[ i ].x;
			if ( cell->x >= 10 ){
				cell->x %= 10;
				cell->next->x += 1;
			}
		}
		adjustDigit();
		rewrite();
		mi.adjustDigit();
	}
	void operator*=( int d ){
		myInt ee, result;
		ee = *this;
		int eeDigit = ee.getDigit();
		int dDigit = static_cast< int >( log10( static_cast< double >( d ) ) ) + 1;
		for ( int i = 0; i < dDigit; ++i ){
			init();
			secureDigit( eeDigit + 1 );
			tCell* cell = head;
			for ( int j = 0; j < eeDigit; ++j ){
				cell = cell->next;
				cell->x += ee[ j ].x * static_cast< char >( d % 10 );
				cell->next->x += ( cell->x / 10 );
				cell->x = ( cell->x % 10 );
			}
			for ( int j = 0; j < i; ++j ){
				pushFront( 0 );
			}
			result += *this;
			d /= 10;
		}
		*this = result;
	}

private:
	void init(){
		for ( int i = digit; i > 0; --i ){
			tCell* cell = tail->prev;
			cell->prev->next = cell->next;
			cell->next->prev = cell->prev;
			SAFE_DELETE( cell );
		}
		digit = 0;
		numStr = "";
	}
	void setFigure( int d ){
		init();
		while ( 1 ){
			if ( d < 10 ){
				pushBack( d );
				break;
			}
			pushBack( d%10 );
			d /= 10;
		}
	}
	void pushFront( int i ){
		++digit;
		tCell* cell = new tCell;
		cell->x = i;
		cell->prev = head;
		cell->next = head->next;
		cell->prev->next = cell;
		cell->next->prev = cell;
		numStr += static_cast< char >( i );
	}
	void pushBack( int i ){
		++digit;
		tCell* cell = new tCell;
		cell->x = i;
		cell->prev = tail->prev;
		cell->next = tail;
		cell->prev->next = cell;
		cell->next->prev = cell;
		numStr = static_cast< char >( i ) + numStr;
	}
	tCell* eraseBack( tCell* cell ){
		tCell* temp = cell->prev;
		--digit;
		numStr.erase( 0, 1 );
		cell->prev->next = cell->next;
		cell->next->prev = cell->prev;
		SAFE_DELETE( cell );
		return temp;
	}
	void secureDigit( int d ){
		for ( int i = digit; i < d; ++i ){
			pushBack( 0 );
		}
	}
	void adjustDigit(){
		tCell* cell = tail->prev;
		while ( !cell->x ) {
			if ( digit <= 1 ) return;
			cell = eraseBack( cell );
		}
	}
	void rewrite(){
		numStr = "";
		tCell* cell = head;
		for ( int i = 0; i < digit; ++i ){
			cell = cell->next;
			numStr = static_cast< char >( cell->x ) + numStr;
		}
	}

	int digit;
	tCell* head;
	tCell* tail;
	string numStr;
};

ostream& operator<<( ostream& os, myInt& mi ){
	string s;
	mi.getNumber( s );
	return ( os << s.c_str() );
}

int main(){
	int n;
	myInt a( 1 );
	cin >> n;

	for ( int i = 0; i < n; i++ ){
		a *= ( i + 1 );
	}

	cout << a << endl;

	return 0;
}

C++: #include <iostream>
using namespace std;
int fact(int n) {
  if(n == 1) return 1;
  else {
	return n * fact(n - 1);
  }
}
int main() {
  int n;
  cin >> n;
  cout << fact(n) << endl;
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int n;
	cin >> n;
    int x = 1;
    for(int i=0; i<n; ++i){
		x = x*(i+1);
    }
    cout << x;
	return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;

long long int  factorial(int n) {
	if (n == 0) {
		return 1L;
	}
	else {
		return n * factorial(n - 1);
	}
}

int main()
{
	int n;
	cin >> n;

	cout << factorial(n) << endl;

	return 0;
}

C++: #include <iostream>
using namespace std;

int main(){
  int n;
  while(cin >> n){
  for(int i=n-1;0<i;i--)
    n *= i;
  cout << n << endl;
  }
  return 0;
}

C++: #include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int fctrl(int n){
    if(n==0||n==1)return 1;
    else return n*fctrl(n-1);

}
int main()
{
    long long int  n;
    cin>>n;
    if(n<=20){
    long long  rslt = fctrl(n);

    cout<<rslt<<endl;
    }
    return 0;
}

C++: #include <iostream>
#include<math.h>
using namespace std;

int main() {
    int n;
    cin>>n;
    int sum=1;
    for(int i=2; i<=n; i++){
        sum*=i;
    }
    cout<<sum<<endl;
    return 0;
}

C++: #include <cstdio>
#include <algorithm>
#include <functional>
#include <stack>
#include <cmath>
using namespace std;

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define llong long long

llong factorial(int n) {
  if(n == 0) return 1;
  return (llong)n * factorial(n-1);
}

int main() {
  int n;
  scanf("%d",&n);
  printf("%lld\n",factorial(n));
  return 0;
}