Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func factorial(n int) int {
	if n == 1 {
		return 1
	}
	return n*factorial(n-1)
}
func main() {
	scanner.Split(bufio.ScanWords)
	n := nextInt()
	fmt.Println(factorial(n))
}

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

using namespace std;

long long f(int n)
{
  if (n == 0) return 1;
  return f(n - 1) * n;
}
int main()
{
  int n;
  scanf("%d", &n);
  printf("%lld\n", f(n));
  return 0;
}

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

#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false


long long 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>
//#include <fstream.h>
//#include <cstring>
using namespace std;

long int factorial(int n) {
  int i,x=1;
  for(i=1;i<=n;i++) {
    x*=i;
  }
  return x;
}

int main() {
  
  int n;

  cin >> n;

  cout << factorial(n) << "\n";

  return 0;
}

C++: #include<cstdio>

int main(){
	long long n,a = 1;
	scanf("%ld", &n);
	while(n){
		a *= n;
		n--;
	}
	printf("%ld\n", a);
	return 0;
}

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

C++: #include<iostream>

using namespace std;

int main()
{
  long long int n;
  cin >> n;
  int i = n;
  while(i-- != 1) n *= i;
  cout << n << endl;;
  
}

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

C++: #include <iostream>

using namespace std;

long long factorial(int n)
{
	if (n == 1) { return 1; }

	return factorial(n - 1) * n;
}

int main()
{
	int n;

	cin >> n;

	cout << factorial(n) << endl;

	return 0;
}

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

int main(void)
{
long long a;
int n;

scanf("%d", &n);

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

std::cout << a << std::endl;

return (0);
}

C++: #include<iostream>

long long calc(int n){

	if (n == 1)return 1;

	return n*calc(n - 1);

}

int main(){

	int n;
	std::cin >> n;

	std::cout << calc(n) << std::endl;

	return 0;
}

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

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

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

int main() {
	int n;
	long long d=1;
	cin >> n;
	for (int i = 0; i < n; i++){
		d *= (i + 1);
	}
	cout << d;
	char c;
	cin >> c;
}

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

C++: #include<stdio.h>
int main(){
    int a;
    scanf("%d",&a);
    long long int b=1;
    for(int i=0;i<a;)b*=++i;
    printf("%lld\n",b);
}

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

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

int f(int n){
	return (n == 0 ? 1 : n * f(n-1));
}
int main(){
	int n;
	cin >> n;
	cout << f(n) << endl;
}

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

C++: #include<iostream> //header file
 
using namespace std;
 
int main()
 
{
 
    long long n,fact=1; 
 
    cout<<" Enter Number:  ";
 
    cin>>n;
 
    for(int i=1;i<=n;i++)
 
    {
 
        fact=fact*i; 
 
    }
 
     cout<<fact;
 
     return 0;
 
}

C++: #include <iostream>

using namespace std;

int f(int n){

if (n==1) return 1;
if (n==2) return 2;

return n*f(n-1);}


int main(){
 
cout<< "enter n:";
int n;
cin >>n;
cout<<f(n)<<endl;
return 0;
}

C++: 
#include<stdio.h>

int main(void){
	int n;
	
	scanf("%d",&n);
	
	int ans = 1;
	for(int i=0; i<n; i++){
		ans = ans * (i+1);
	}
	
	printf("%d\n",ans);
}

C++: #include <iostream>
#include<math.h>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;

int main()
{
    int  a=0,b=0,i=0;
    cin >> a;
    b=1;
    for(i=0;i<a;i++){
        b=b*(i+1);

    }#include <iostream>
#include<math.h>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;

int main()
{
    int  a=0,b=0,i=0;
    cin >> a;
    b=1;
    for(i=0;i<a;i++){
        b=b*(i+1);
    }

    cout << b << endl;



    //cout << endl;

return 0;

}


    cout << b << endl;



    //cout << endl;

return 0;

}

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

int main()
{

	int i, num, total=1;
	
	cout << "Enter an integer : " << endl;
	cin >> num;
	
	for(i=1;i<=num;i++)
	total *=i;
	
	cout << total;
		
	return 0;
	
	}

C++: #include <iostream>
#include <string>
#include <stack>
#include <math.h>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <vector>

using namespace std;

long long f(long long m) {
	if (m == 0) return 1;
	else return m*f(m - 1);
}




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

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <iterator>
#include <queue>
#include <stack>
#include <deque>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <string>
#include <cmath>
#include <complex>
#include <functional>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <cstdlib>
#include <cctype>

#define REP(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(int)c.size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define rall(u) (u).rbegin(),(u).rend()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl
#define v_delete(a,b) (a).erase(remove((a).begin(), (a).end(), b), (a).end())
#define v_unique(a) (a).erase(unique((a).begin(), (a).end()), (a).end())
#define VV(T) vector<vector< T > >
#define init(a,b) memset((a), (b), sizeof((a)))
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e10,EPS=1e-9;


template<class T>int SIZE(T a){return a.size();}
template<class T>string IntToString(T num){string res;stringstream ss;ss<<num;return ss.str();}
template<class T>T StringToInt(string str){T res=0;for(int i=0;i<SIZE(str);i++)res=(res*10+str[i]-'0');return res;}
template<class T>T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
template<class T>T lcm(T a,T b){return a/gcd(a,b)*b;}

template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
typedef pair<int,int> pii;

inline bool IN(int x, int y, int w, int h)
{
    return 0 <= x && x < w && 0 <= y && y < h;
}


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

}

C++: #include<iostream>
#include<sstream>
#include<fstream>
#include<cstdio>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<algorithm>
#include<cmath>
#include<cstdlib>
#include<string>
using namespace std;

long long fac(int n){
	long long ret = 1;
	for(int x=2;x<=n;++x)ret *= x;
	return ret;
}

int main(){
	int n;
	while(scanf("%d",&n)==1){
		cout<<fac(n)<<endl;
	}
	return 0;
}