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>
using namespace std;
typedef long long ll;
#define MAX 20

ll memo[MAX+1];
ll factorial(int n) {
  if(n == 0) return memo[n] = 1;
  else if(n == 1) return memo[n] = 1;
  else if(memo[n] != 0) return memo[n];
  return memo[n] = n*factorial(n-1);
}

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

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

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

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

        return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
    long int n,sum=1;
    cin>>n;
    for(int a=1;a<=n;a++)
    {

       sum=sum*a;
    }
    cout<<sum<<endl;
    return 0;
}

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

return 0;
}

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

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

C++: #include <cstdio>

int main(void)
{
	int n;
	int i;
	long sum;
	
	sum = 1;
	
	scanf("%d", &n);
	
	for (i = 1; i <= n; i++){
		sum *= i;
	}
	
	printf("%d\n", sum);
	
	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 = ans * i;
	}
	cout << ans << endl;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

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

int main()
{
//	cut here before submit 
//	freopen("testcase.dat", "r", stdin);
	string str = "";
	long res;
	long n;

	getline (cin, str );
	stringstream ssn(str);
	ssn >> n;

	res = factorial(n);

	cout << res << 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 << n << 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()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin>>n;
    long long fact=1;
    for(int i=2; i<=n; i++) fact*=i;
    cout<<fact<<'\n';
    return 0;
}

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

int ans = 1;

int Factional(int n){
  if(n == 1)return 1;
  else{
    return ans = n * Factional(n - 1);
  }
}

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

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <deque>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>

using namespace std;

long long n, fn;

int main() {
	cin >> n;

	fn = 1;

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

	cout << fn << endl;

	return 0;
}

/*@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@                       @*/
/*@ debug output erased ? @*/
/*@                       @*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@*/

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

C++: #include <cmath>
#include <iostream>
#include <cstdio>
#include <ctype.h>
#include <cstdlib>
#include <algorithm>
#include <string>
#include <iomanip>
#include <set>
#include <stack>
#include <queue>
#include <vector>
#include <sstream>

using namespace std;

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

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

C++: #include<cstdio>
using namespace std;
long long int fact(long long int x){
    if(x == 1) return 1;
    else return fact(x-1) * x;
}
int main(){
    int n;
    scanf("%d",&n);
    printf("%lld",fact(n));
    return 0;
}

C++: #include<cstdio>

int n;
int answer=1;

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

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;

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

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

C++: #include <iostream>

int main() {
  int n;

  std::cin >> n;

  unsigned int factorial = 1;
  while (n > 0)
    factorial *= n--;

  std::cout << factorial << std::endl;

  return 0;
}

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

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define  rep(i, n)    for(ll (i)=0; (i)<(n);  (i)++)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T1, class T2> inline void minup(T1& m, T2 x){ if(m>x) m=static_cast<T2>(x); }
template<class T1, class T2> inline void maxup(T1& m, T2 x){ if(m<x) m=static_cast<T2>(x); }

#define INF 1000000000
#define MOD 1000000009
#define EPS 1E-9

ll n;
ll res = 1LL;

int main()
{
  cin >> n;
  rep(i, n) res *= i + 1;

  cout << res << endl;

  return 0;
}

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

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

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

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

C++: #include <iostream>

using namespace std;

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

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

int main(){

	int n, x;
	
	cin >> n;
	
	x = 1;
	for(int i=1; i<=n; i++){
		x *= i;
	}

	cout << x << endl;

	return 0;
}

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