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 <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define int long long
using namespace std;
typedef pair<int, int> P;

signed main(){
    int n;
    cin >> n;
    int ans = 1;
    rep(i, 1, n + 1) ans *= i;
    cout << ans << endl;
}

C++: #include <iostream>
#include <cmath>
using namespace std;
int main() {
  int a;
  cin >> a;
  cout << tgamma(a+1) << endl;
  return 0;
}

C++: #include<iostream>
#include<stdio.h>

using namespace std;

long long factorial(int n) {

	return (n > 0 ? n*factorial(n - 1) : 1);

}

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

	return 0;
}

C++: #include<iostream>

int main(){
  long long int n,ans=1;
  std::cin >> n;
  if(n==0){
    std::cout << 1 <<std::endl;
    return 0;
  }
  while(n>0){
    ans *= n;
    --n;
  }
  std::cout << ans << std::endl;
}

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

int fac(int x) {
	if (x == 0)
	{
		return 1;
	}
	else
	{
		return x*fac(x - 1);
	}
}

int main()
{
	int n;
	cin >> n;
	cout << fac(n) << endl;
}

C++: n;main(i){for(n=scanf("%d",&i);i;n*=i--);printf("%d\n",n);}

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

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

C++: #include <iostream>

using namespace std;
long long fact(int n) {
  if (n < 1 || n > 20) return 0;
  if (n == 1) return 1;
  else return fact(n - 1) * (long long)n;
}

int main() {
  int n;
  cin >> n;
  if (fact(n))
    cout << fact(n) << endl;
  return 0;
}

C++: #include <iostream>

unsigned Factorial(unsigned n)
{
	int ans=n;
	while(--n>0)
	{
		ans *= n;
	}
	return ans;
}

int main()
{
	unsigned n;
	std::cin >> n;

	std::cout << Factorial(n);
}

C++: #include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

void solve()
{
	int n;
	cin >> n;
	if(n == 1)
	{
		cout << 1 << endl;
		return;
	}
	vector<int> a(1000);
	for(int i = 1; i < 1000; ++i)
	{
		a[i] = 0;	
	}
	a[0] = 1;

	for(int i = 2; i <= n; ++i)
	{
		int buf = 0;
		for(int j = 0; j < a.size() - 1; ++j)
		{
			int temp = 0;
			temp = a[j] * i + buf;
			buf = temp / 10;
			a[j] = temp % 10;
		}
	}
	reverse(a.begin(), a.end());
	bool flag = false;
	for(int b = 0; b < a.size(); ++b)
	{
		if(a[b] != 0)
		{
			flag = true;
		}
		if(flag)
		{
			cout << a[b];
		}
	}
	cout << endl;
}

int main()
{
	solve();
	return(0);
}

C++: nclude<iostream>
using namespace std;
int function(int n){
  if(n > 1)
    return n * function(n-1);
  else
    return 1;
}

int main(){
  int n;
  cin >> n;
  cout << function(n) << endl;
}

C++: #include <iostream>

using namespace std;

int main(int argc, *char argv[]) {
    int answer = 1;
    int n = argv[1];

    for (int i = n; i != 0; i--) {
            answer *= i;
    }
cout << answer;
return 0;
}

C++: #include<stdio.h>
int fact(int n){
    if(n>1)
    return n*fact(n-1);
    return 1;
}
main(){
int x;
scanf("%d",&x);
    printf("%d\n",fact(x));
}

C++: #include <iostream>

using namespace std;

int main() {
  unsigned int n;
  cin >> n;
  unsigned int fac=1;
  while(n) {
    fac*=n;
    n--;
  }
  cout << fac << endl;
}

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

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

  return 0;
}

C++: #include <iostream>

int main(){
    unsigned long long f = 1;
    int n;
    std::cin >> n;
    for(int i=1;i<=n;++i){
        f *= i;
    }
    std::cout << f;
    return 0;
}

C++: /*#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<vector>
#include<math.h>
#include<queue>
#include <algorithm>
#include<functional>
#include<cstdlib>
#include<cmath>


#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 FORR(i, m, n) for(int i = m;i >= n;i--)
#define CI cin >>
#define CO cout <<
#define E << endl;

using namespace std;

typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;



int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

int A = 0, B = 0, K = 0, T = 0, W = 0, N = 0, H = 0;
int n = 0;
double L = 0;
double S = 0;
double ar = 0, br = 0, cr = 0;
int answer = 0;

string C;
string sA, strB;
vector<vector<char>> map;
vector<double> num;
vector<string> str;

int sum = 0;

vector<int> value;
vector<int> weight;

int dp[110][10010];

int data_[210][2] = { -2 };

void input(void) {
	CI n;
	return;
}


int main(void) {
	input();
	double money = 100000;
	
	for (int i = 0; i < n; i++) {
		money *= 1.05;
	}
	
	if ((int)money % 1000 >= 500) {
		CO (int)(money - ((int)(money) % 1000) + 1000) E
	}
	else {
		CO (int)(money - ((int)(money) % 1000)) E
	}

	

	return 0;
}

*/

#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<vector>
#include<math.h>
#include<queue>
#include <algorithm>
#include<functional>
#include<cstdlib>
#include<cmath>


#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 FORR(i, m, n) for(int i = m;i >= n;i--)
#define CI cin >>
#define CO cout <<
#define E << endl;

using namespace std;

typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;



int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

int A = 0, B = 0, K = 0, T = 0, W = 0, N = 0, H = 0;
long long int n = 0;
double L = 0;
double S = 0;
double ar = 0, br = 0, cr = 0;
int answer = 0;

string C;
string sA, strB;
vector<vector<char>> map;
vector<double> num;
vector<string> str;

int sum = 0;

vector<int> value;
vector<int> weight;

int dp[110][10010];

int data_[210][2] = { -2 };

void input(void) {
	CI n;
	return;
}


int main(void) {
	input();

	
	for (int i = n - 1; i > 1; i--) {
		n  *= i;
	}

	CO n E

	return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int main(){
    int n;
    double x=1;
    cin >> n;
    for (int i=1;i<=n;i++){
        x*=i ;
    }
    // cout << x << endl;
    printf("%.0f",x);
}

C++: nclude<iostream>
using namespace std;
int function(int n){
  if(n > 1)
    return n * function(n-1);
  else
    return 1;
}

int main(){
  int n;
  cin >> n;
  cout << function(n) << endl;

}

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

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 = 1;
	scanf_s("%d", &n);
	for (int i = 1; i <= n; ++i) {
		ans *= i;
	}
	printf("%lld\n", ans);
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    long long i=1,n;
    scanf("%lld",&n);
    while(n!=0){
        i*=n;
        n--;
    }
    printf("%lld\n",i);
    return 0;
}

C++: #include <iostream>
#include <cmath>

using namespace std;

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

C++: #include <stdio.h>

int main()
{
  long long int i, n;
   long long int fact = 1;
  scanf("%lld", &n);

  for (i = 1; i <=n; i++)
    fact = fact * i;

  printf("%lld", fact);

  return 0;
}

C++: #include <iostream>

using namespace std;

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

C++: #include <stdio.h>

int main()
{
  long long int n;
  int i, fact = 1;
  scanf("%lld", &n);

  for (i = 1; i <=n; i++)
    fact = fact * i;

  printf("%lld", fact);

  return 0;
}