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++: #include <iostream>
#include <vector>
using namespace std;

int main(){
	long long int n,m=1;
	
	cin >> n;
	for(int i=1 ; i<=n ; i++){
		m *= i;
	}
	cout << m << endl;
	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<stdio.h>

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

	if(0 < x && x < 21){
		for(int i = x - 1; i > 1; i--) x*=i;
		printf("%d\n", x);
	}

	return 0;
}

C++: #include <stdio.h>

long kai(long i){
		if(i==1||i==0){
			return 1;
		}
		return i*kai(i-1);
	}
int main(){

	long n;
	scanf("%ld",&n);

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

}

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

float factorial(float n);

int main()
{
    float n;
    
    do
    {
    cout<< "Enter value : " ;
    cin >> n;
    
    }while(n>20);
    
    cout<< factorial(n) << endl;
    
    return 0;
}

float factorial(float n)
{
    int x;
    float sum=1;
    for(x=1; x<=n; x++)
    {
       sum = sum*x;
    }
    return sum;
}

C++: #include <stdio.h>

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

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

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

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

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

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

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

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

int main(){
	
	long long int a,b,c,d;
	
	cin >> a;
	
	for(b=1; b<=a; b++){
		c = 1;
		for(d=b; d>=1; d--){
			c *= d;
		}
	}
	
	cout << c << '\n';
	
	return 0;
}

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

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

C++: void factorial(int n) {
    int answer = 1;

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

    cout << answer << endl;
}

C++: #include<cstdio>

int n;
long long answer=1;

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

C++: #include<iostream>
#include<cstdio>
using namespace std;
#define int long long
signed main(){
        int a;
        while( scanf("%lld", &a) != EOF ){
                int b=1;
                for(int i=2; i<=a; i++){
                        b*=i;
                }
                printf("%lld\n", b);
        }
        return 0;
}

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

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

C++: #include<stdio.h>

int main(void)
{
	unsigned long long int kai=1;
	int n,i,x=0;
	scanf("%d",&n);
	for(i=1;i<n+1;i++)
	{
		 kai=kai*i;

		 if(kai % 10 ==0)
		 {
			 kai = kai / 10;
			 x+=1;
		 }
	}
	if(x==0)
	printf("%d\n",kai);
	else
	{
		printf("%d",kai);
		for(i=0;i<x;i++)
		{
			printf("%d",0);
		}
		printf("\n");
	}
  return 0;
}

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

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

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

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

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

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

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

long long fact(long long a){
  if(a<=1)return 1;
  return fact(a-1)*a;
}

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

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

int i;

long long facto(int n){
	if(n==1) return n;
	else return n * facto(n-1);

}
int main(){
	int n;
	cin >> n;
	cout << facto(n) << "\n";


}

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

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

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

int long recursion(int n) {
    if (n==1) {
        return 1;
    }
    return n*recursion(n-1);
}


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

C++: #include <stdio.h>

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

C++: #include <stdio.h>

int main(){
	int n;
	int i;
	long long ans=1;

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

}

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


int factorial_recursive(int n);

int main(void)
{
  int n;
   int result1;


cin>>n;

//if(0<n&&n<21) ;
//else return 0;

	result1 = factorial_recursive(n);

	cout<<result1;
	return 0;

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

C++: /*AOJ 0019*/

#include<iostream>

using namespace std;

int main(){

	int n;
	long long int sum = 1;
	cin>>n;

	for(int i = 1;i<=n;i++){
		sum *= i;
	}
	cout<<sum<<endl;

	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long ll;
int main(){
    ll n,ans=1;
    cin >> n;
    while(n){
        ans*=n;
        n--;
    }
    cout << ans << endl;
    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>
#include<cfloat>
#include<cassert>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define EPS (1e-10)
using namespace std;

typedef unsigned int uint;
typedef long long ll;
typedef complex<double> P;

#define PI (3.1415926535)
#define EPS (1e-10)

int main(){
  int n;
  while(cin>>n){
    ll f = 1ll;
    do{
      f *= n;
    }while(--n!=0);
    cout << f << endl;
  }
  return 0;
}