Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

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

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
template<typename V> constexpr typename V::value_type sum(const V &v) { return accumulate(all(v), 0); }
void solve();
main { solve(); return 0; }
// clang-format on

int factorial(int n) {
  return n == 0 ? 1 : n * factorial(n - 1);
}

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

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
using namespace std;

typedef long long ll;
typedef pair<int, int> P;

#define all(c) (c).begin(), (c).end()
#define pb push_back
#define mp make_pair
#define EXIST(v,i) (find(all(v), i) != (v).end())
#define ERASE(v,i) (v).erase(remove(all(v), i), (v).end())
#define INDEX(v,i) (find(all(v), i) - (v).begin())
#define rep(i,n) for(int i = 0; i < (int)n; ++i)
#define debug(x) cerr << #x << " = " << (x) << endl;

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

const int INF = 100000000;
const double PI = 3.14159265358979323846;
const double EPS = 1e-10;

ll factor(ll n) {
	return n == 1 ? 1 : n * factor(n - 1);
}

int main() {
	ll n; cin >> n;
	cout << factor(n) << endl;
	return 0;
}

C++: #include<stdio.h>

int main(){
	int x;
	scanf("%d", &x);

	for(int i = x - 1; i > 1; i--) x*=i;
	printf("%d\n", x);
	return 0;
}

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

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

C++: c;main(){c=!puts("2432902008176640000");}

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

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

}

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

int ans[] = {1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800. 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000};

int main(){
  int a;
  scanf("%d", &a);
  printf("%d\n", ans[a - 1]);
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
long long int n, sum=1;
cin>>n;
for(int i=2; i<=n; i++){sum*=i;}
cout<<sum<<endl;


return 0;
}

C++: #include<iostream>
using namespace std;
long long int kaizyo(int x){
  if(x<2)return 1;
  return x*kaizyo(x-1);
}
int main(){
  int n;
  long long int a;
  cin>>n;
  a=kaizyo(n);
  cout<<a<<endl;
}

C++: #include <iostream>

using namespace std;

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

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

C++: #include<iostream>
using namespace std;
main(){
	int a;
	long long int ans=1;
	cin>>a;
	for(int i=1;i<=a;++i){
		ans*=i;
	}
	cout<<ans<<endl;
}

C++: #include <iostream>

using namespace std;

int fact(int n) {
	if (n == 1) { return n; }
	if (n > 1) { n *= fact(n - 1); }
}

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

C++: #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
typedef long long LL; 

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n;
	cin >> n;
	
	LL ans = 1;
	while(n > 0){
		ans *= n;
		n--;
	}
	
	cout << ans << endl;
		
	return 0;
}

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

unsigned int kaijo(int n) {
  unsigned int ans = 1;
  for(int i = n; i > 0; i--) {
    ans *= i;
  }
  return ans;
}

int main(void) {
  int n;
  cin >> n;
  cout << kaijo(n) << endl;
  
  return 0;
}

C++: #include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>
#include <complex>
#include <map>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second

static const double PI=6*asin(0.5);
typedef long long ll;
typedef complex<double> CP;
typedef pair<long long,int> P;
static const int INF=1<<24;

ll n;
ll ans;

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

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<string>
#include<cmath>
#include<numeric>
using namespace std;


int main(void) {

  int ans = 1;
  int n;
  cin >> n;
  for(int i=1; i<=n; i++) ans *= i;
  cout << ans << endl;
  return 0;
}

C++: #include <stdio.h>

int main() {
    long long n = 0;
    long long result = 1;
    scanf("%d", &n);

    for (long long i = n; 1 < i; --i) {
        result *= i;
    }

    printf("%lld", result);

    return 0;
}

C++: //কী পেয়েছো তুমি, কী চেয়েছিলে তুমি.? হিসেবটা তোমার বড়ই গড়মিল...!!//
#include <bits/stdc++.h>
using namespace std;
#define INF 0x3F3F3F3F
typedef long long ll;
int main()
{
    int n;
    cin>>n;
    ll sum=1;
    for(int i=2;i<=n;i++){
        sum=sum*i;
    }
    cout<<sum<<endl;
}
/*
5 6
1 0
0 5
1 2
1 3
2 3
3 4
*/

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

int fact(int n){
  if(n==0||n==1) return 1;
  return n * fact(n-1);
}

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

C++: #include<cstdio>

int main() {
    unsigned long long tot = 1;
    int x;
    scanf("%d", &x);
    for (int i = 1; i != x + 1; i++) {
        tot*= i;
    }
    printf("%lld\n", tot);
    return 0;
}

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

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