Go: package main

import (
        "fmt"
)

func main() {
        var n int
        fmt.Scanf("%d", &n)
        fmt.Println(fact(n))
}

func fact(n int) (f uint64) {
        if n < 2 {
                return uint64(1)
        } else {
                return fact(n-1) * uint64(n)
        }
}

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

#define loop(i,a,b) for(int i=a ;i < b ; i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(void){
	int a;
	int sum=1;
	while(cin>>a){
	
	loop(i,1,a+1)sum*=i;
	cout<<sum<<endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int fact(int n);

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

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

C++: //0019
#include <bits/stdc++.h>
using namespace std;

int main(){
	double n,ans = 1;
	for(cin>>n;n != 0;n--){
	ans *= n;
}
	printf("%.f\n",ans );
	return 0;
}

C++: #include<stdio.h>

int main(){

int n;
long p=1;

scanf("%d",&n);
for(int i=1;i<=n;i++)
p=p*i;

printf("%ld\n",p);
return 0;

}

C++: /*Filename: aoj0019.cpp
 *Author: Mushiyo
 */

#include <iostream>

using namespace std;

long long factorial(int n){
	long long result = 1;

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

	return result;
}

int main(){
	int n = 0;

    while(cin >> n){
        cout << factorial(n) << endl;
    }

	return 0;
}

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

int factorial(int n){
  if(n > 0){
    return n*factorial(n-1);
  } else {
    return 1;
  }
}

int main(){
  int n;
  cin>>n;
  if(n<1||20<n)return 0;
  cout<< factorial(n);
}

C++: #include <bits/stdc++.h>
using namespace std;
/* {{{ */
/*-------------------------------*/
struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);}} fast;

#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (b) - 1; i >= (a); i--)
#define REP(i, n) for(int i = 0; i < (n); i++)
#define rep(i, n) for(int i = 0; i < (n); i++)
#define RREP(i, n) for(int i = (n) - 1; i >= 0; i--)
#define rrep(i, n) for(int i = (n) - 1; i >= 0; i--)
 
#define all(i) (i).begin(),(i).end()
#define rall(i) (i).begin(),(i).end(),greater<int>()
#define CLEAR(ary, i) memset((ary), (i), sizeof(ary))
#define PB push_back
#define pb push_back
#define mp make_pair
#define FST first
#define SEC second
#define fst first
#define sec second

#define int long long

const int INF = 999999999;
const int MOD = 1e9 + 7;
const double PI = acos(-1);
const int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};

inline int in(){int x;std::cin>>x;return x;}

typedef long long ll;
typedef pair<int, int> pint;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef vector<long long> llv;
typedef vector<pint> vpint;
typedef queue<int> qint;
typedef stack<int> si;
typedef deque<int> dint;

template <typename T> void print(T x) { std::cout << x << '\n'; }
/*-------------------------------*/
/* }}} */

int fact(int n)
{
  if (n == 0) return 1;

  return n * fact(n - 1);
}

signed main()
{
  int a = in();

  cout << fact(a) << '\n';

  return (0);
}

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

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

int main ()
{
    int n;
    cin >> n;
    long long res = 1;

    while (n--) {
        res *= (n + 1);
    }

    cout << res << endl;

    return 0;
}

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

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

int main(){
	unsigned int n;
	std::cin >> n;
	std::cout << factorial(n) << std::endl;
	return 0;
}

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

int main()
{
    int n;
    int ans = 1;
    time_t start = clock();
    cin >> n;
    for(int c = n; c > 1; c--)
    {
        ans *=c;
    }
    cout << ans << endl;
    return EXIT_SUCCESS;
}

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

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<string>
#include<functional>
#include<queue>
#include<stack>
#include<math.h>
#define INF 999999

using namespace std;

typedef long long ll;

int d[22];

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

	d[1] = 1;
	for (int i = 2; i <= n; i++) {
		d[i] = d[i - 1] * i;
	}
	cout << d[n] << endl;
	
	return 0;
}

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

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

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

int main(void)
{
  int a,b,i;
  cin >> a;
  for(i=a;i>0;i--)
  {
    b*=i;
  }
  cout << b << endl;
  return 0;
}

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

int main(){
  int f=1;
  int i;

  cin >> i;

  if( i>=1 && i<=20 ) {
    while(i>0){
      f*=i;
      i--;
    }
    cout << f << "\n";
  }

  return 0;
}

C++: #include <iostream>

using namespace std;

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

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

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

C++: #include <iostream>
using namespace std;
int main(){
    int n;
	cin >> n;
    long int x = 1;
    for(int i=0; i<n; ++i){
		x = x*(i+1);
    }
    printf("%d",&x);
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define F first
#define S second
#define pb(x) push_back(x)
#define mp(a,b) make_pair(a,b)
#define sz size()
#define all(A)    A.begin(), A.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define f0(i,b)   for(int i=0;i<(b);i++)
#define f1(i,b)   for(int i=1;i<=(b);i++)
#define f2(i,a,b) for(int i=(a);i<=(b);i++)
#define fr(i,b,a) for(int i=(b);i>=(a);i--)
#define rep(i,a,b,c) for(int i=(a);i!=(b);i+=(c))
#define mod 1000000007

#define forr(i,n)    for(i=0; i<n; i++)
#define whilee(i,t)  while(i!=t)
#define  sl(a)  scanf("%lld",&a)
#define  pl(a)  printf("%lld",a)

//for(auto it =A.begin(); it!=A.end(); it++)
//sort(A.begin(),A.end());
//binary_search(A.begin(),A.end(),x);
//reverse(A.begin(), A.end());
//cout << *max_element(A.begin(), A.end());
//cout << *min_element(A.begin(), A.end());
//count(A.begin(), A.end(), X); //counts the occurrences of X
//distance(A.begin(),A.end());  //distance between first to last element
//accumulate(A.begin(), A.end(), 0); //add
//next_permutation(A.begin(), A.end());
//prev_permutation(A.begin(), A.end());
//swap(S[0], T[0]);
//scanf("%d",&x);
//printf("%d\n",x);

//vector <int> A;
//deque <int> A;
//queue <int> A;
//stack <int> A;
//set <int> A;
//map <int,int> A;
//pair <int,int> A ;
//vector <pair <int,int>> A ;
//char ch;
//string S, T, U;
ll factorial(ll n)
{
    if(n==1)
    {
        return 1;
    }
    else
    {
        return n*factorial(n-1);
    }
}
ll i, j, k, a, b, c, d, f, g, h, l, m, n, p, q, r, s, t, w, x, y, z, maxx=INT_MIN, minn=INT_MAX, ans=0, sum=0, cnt=0;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    scanf("%lld",&n);
    printf("%lld\n", factorial(n));

    return 0;
}