Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)
	n, _ := strconv.Atoi(read())
	sum := 1
	for i := n; i > 0; i-- {
		sum *= i

	}
	fmt.Println(sum)
}

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

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

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int ke(int x)
{
    if(x == 1)return 1;
    else return x*ke(x-1);
}
int main()
{
    int a;
    cin >> a;
    printf("%d\n",ke(a));
    return 0;
}

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

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

long long sum(int n){
    if(n==1) return 1;
    if(n==2) return 2;

    return n*sum(n-1);
      }
    
    int main(){
        int n;
        cin>>n;
        cout<<sum(n)<<endl; 
        
        return 0;
    }

C++: #include<stdio.h>
int main()

{
    int a, i;
    scanf("%d", &a);
    int fac = a;
    for(i=a-1; i>1; i--)
    {
        fac=fac*i;
    }
    printf("%d", fac);
    return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <sstream>
#include <utility>
#include <cstdlib>
#include <cctype>
#include <climits>
#include <fstream>

using namespace std;
typedef long long ll;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) for(int i=0;i<(n);++i)
#define foreach(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); itr++)
#define dbg(x) cout << #x"="<< (x) << endl
#define mp(a,b) make_pair((a),(b))
#define pb(a) push_back(a) 
#define in(x) cin >> x;
#define all(x) (x).begin(), (x).end()
#define INF 2147483600
#define fi first
#define se second
using namespace std;

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

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

C++: #include<string>
#include <stdio.h>
#include <math.h>
#include <cctype>
#include<queue>
#include<stack>
#include<cstdio>
using namespace std;
int main(){
	long long int ans;
	int n;
	cin>>n;
	ans=1;
	for(int i=1;i<=n;i++){
		ans*=i;
	}
	cout<<ans<<endl;
	return 0;
}

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

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

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

std::uint32_t factorial(std::uint32_t n)
{
	if (n == 0) {
		return 1;
	}
	return n * factorial(n - 1);
}

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

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

int main(){
int cnt ,i,kaeru;
double num;
char total[10];
gets(total);
kaeru= atoi(total);
num = 1;
for( i = kaeru ; i >= 1 ; i-- ){
num *= i;
}
printf("%f",num);

 return 0;
}

C++: #include<iostream>

using namespace std;

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

int main(){

	int n;

	cin >> n;

	cout << f(n);

	return 0;
}

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

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

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

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


int main(void){


    int n,fact = 1;


    cin >> n;

    for(int i = 5;i > 0;i--){
        fact *= i;
    }

    cout << fact << endl;
    return 0;
}

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

int fact(ll a){
  if(a==0)
    return 1;
  else
    return a*fact(a-1);
}

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

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

int main(){
  int a[21],b;
  a[1]=1;
  for(int i=2;i<20;i++)a[i]=a[i-1]*i;
  cin>>b;
  cout<<a[b]<< endl;
  return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<string>
#include<map>
#include<algorithm>
#include<queue>
#include <functional>
using namespace std;
int saiki(int n){
  int m;
  if(n == 0){
    return 1;
  }
  m = saiki(n-1);
  return n*m;
}

int main(){
  int n,ans;
  cin >> n;
  ans = saiki(n);
  cout << ans << endl;
}

C++: #include <iostream>

using namespace std;

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

C++: #include <iostream>
using namespace std;
typedef unsigned long ulong;

ulong factorial(int n){
	ulong s = 1;
	while (n){
		s *= n--;
	}
	return s;
}

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

C++: #include <stdio.h>

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

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

  printf("%d\n", factorial(n));

  return 0;
}

C++: #include <iostream>
unsigned long long int factorial(int i)
{
  if (i <= 1) return 1;
  else        return i * factorial(i - 1);
}
int main()
{
  int n;
  std::cin >> n;
  std::cout << factorial(n) << std::endl;
  return 0;
}

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

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

C++: #include<iostream>
using namespace std;
int n,a,ans;
int !(int x){
if(x<1){return 1;}
if(x>=1){
a=!(x-1)*x;
return a;}}

int solve(){
cin>>n;
ans=!(n);
cout<<ans<<endl;}

C++: #include <stdio.h>

long long int ans[22] ;

void init ( ) ;

int main ( )
{
	long long int s ;
	init ( ) ;
	while ( scanf ( "%lld" , &s ) == 1 ) {
		printf ( "%lld\n" , ans[s] ) ;
	}
	return 0 ;
}

void init ( )
{
	ans[0] = 0 ;
	ans[1] = 1 ;
	for ( long long int i = 2 ; i <= 20 ; i++ ) {
		ans[i] = ans[i-1] * i ;
	}
}

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

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

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

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

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef long long ll;

int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

long long int f(int n){
	int sum;

	if(n==0||n==1){
		return 1;
	}else{
			return n*f(n-1);
	}
}

int main(){
	ios::sync_with_stdio(false);

	int n;

	scanf("%d", &n);

	printf("%lld\n", f(n));
}