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 <cstdio>
#include <cstdlib>
#include <cstdint>
#include <cstring>
#include <cctype>
#include <iostream>
#include <sstream>
#include <vector>
#include <list>
#include <deque>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <functional>
#include <complex>
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
const double PI = 3.141592653589793238462643383279502884L;
const int LARGE_PRIME = 1000000007;
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for(auto i = (c).begin(); i != (c).end(); i++)
#define rtr(c, i) for(auto i = (c).rbegin(); i != (c).rend(); i++)
#define repfn(i,a,cont,next) \
  for(auto i = (a); [=](){return(cont);}(); i = [=](){return(next);}())
#define repby(i,a,b,s) repfn(i,a,i<b,i+s)
#define repab(i,a,b) repby(i,a,b,1)
#define rep(i,b) repab(i,0,b)
#define pb push_back
#define sz(c) int((c).size())

long factorial(long n)
{
  if (n)
    return n * factorial(n-1);
  else
    return 1;
}
int main(int argc, char **argv)
{
  long n;
  cin >> n;
  cout << factorial(n) << endl;
  return 0;
}

C++: #include<stdio.h>

int n;
long long output=1;

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

C++: #include <cstdio>

using namespace std;

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

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

int main() {

  int n;
  cin >> n;

  long long int ans = 1;
  for ( int i = 2; i <= n; i++ ) {
    ans *= i;
  }

  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)

class BigInteger{
private:
  void fromStr(const std::string &str){
    int len = str.size();
    int tmp = 0;

    if(str[0] == '+'){
      sign = 1;
      tmp=1;
    }else if (str[0] == '-'){
      sign = -1;
      tmp=1;
    }else{
      sign = 1;
    }

    nums = std::vector<char>(len-tmp);
    for(int i=0;i<len-tmp;i++){
      nums[i]=str[len-1-i]-'0';
    }
  }
public:
  std::vector<char> nums;
  char sign;
  /*
   * constructors
   */
  BigInteger(){sign = 1;nums = std::vector<char>(1,0);}
  BigInteger(const std::vector<char> n,char s){
    nums = n;
    assert(s == 1 || s == -1);
    sign = s;
  }
  BigInteger(const std::string &str){
    fromStr(str);
  }
  BigInteger(int n){
    char buff[16];
    sprintf(buff,"%d",n);
    fromStr(std::string(buff));
  }

  int size() const{
    return nums.size();
  }
  int len() const{
    return nums.size();
  }

  char operator [] (int n) const{
    if(n<size() && n>=0)
      return nums[n];
    else
      return 0;
  }

  const std::vector<char> &vec() const{
    return nums;
  }
  char sig() const{
    return sign;
  }
  
  std::string toString() const{
    std::string ret="";
    if(sign == -1) ret+="-";
    for(int i=nums.size()-1;i>=0;i--){
      ret+=nums[i]+'0';
    }
    return ret;
  }

  void debug() const{
    std::cout << "sign =" << (int)sign << std::endl;
    for(int i=nums.size()-1;i>=0;i--){
      std::cout << (int)nums[i] << " ";
    }
    std::cout << std::endl;
  }
};

std::ostream &operator << (std::ostream &s , const BigInteger &i){
  return s << i.toString();
}

bool operator > (const BigInteger &a,const BigInteger &b){
  char as = a.sig();
  char bs = b.sig();
  if(as == 1 && bs ==1){
    if(a.len() == b.len()){
      int i=a.len();
      while(--i != -1){
        if(a[i] != b[i]){
          return a[i] > b[i];
        }
      }
      return false;
    }else{
      return a.len() > b.len();
    }
  }else if(as == -1 && bs == -1){
    if(a.len() == b.len()){
      int i=a.len();
      while(--i != 0){
        if(a[i] != b[i]){
          return a[i] < b[i];
        }
      }
      return false;
    }else{
      return a.len() < b.len();
    }
  }else{
    return as == 1;
  }
}
bool operator < (const BigInteger &a,const BigInteger &b){
  return b > a;
}
bool operator == (const BigInteger &a,const BigInteger &b){
  char as = a.sig();
  char bs = b.sig();
  if(as != bs) return false;

  if(a.len() != b.len()){
    return false;
  }else{
    for(int i=0;i<a.len();i++){
      if(a[i]!=b[i]) return false;
    }
  }
  return true;
}

bool operator != (const BigInteger &a,const BigInteger &b){
  return !(a==b);
}

/* operator */
BigInteger operator - (const BigInteger &a){
  return BigInteger(a.vec(),-a.sig());
}

BigInteger operator + (const BigInteger &a,const BigInteger &b){
  int lena = a.size();
  int lenb = b.size();
  int maxlen = std::max(lena,lenb);
  std::vector<char> v = std::vector<char>(maxlen+1,0);
  int sig = 1;

  for(int i=0;i<maxlen;i++){
    v[i] += a.sig()*a[i]+b.sig()*b[i];
    while(v[i] < 0){
      v[i+1]--;
      v[i]+=10;
      std::cout << "test" << std::endl;
    }
    if(v[i] >=10){
      v[i+1] = v[i]/10;
      v[i]%=10;
    }
  }

  if(v[maxlen]<0){
    sig = -1;
    for(int i=0;i<maxlen;i++){
      v[i]=-v[i];
      while(v[i]<0){
        v[i+1]++;
        v[i]+=10;
      }
    }
    v[maxlen]=-v[maxlen];
  }

  int pos=v.size();
  while(pos!=1 && v[pos-1]==0) pos--;
  if(pos != v.size()) v.resize(pos);
  
  return BigInteger(v,sig);
}

BigInteger operator + (const BigInteger &a,int b){
  return a+BigInteger(b);
}


BigInteger &operator += (BigInteger &a,const BigInteger &b){
  a = a+b;
  return a;
}
BigInteger &operator += (BigInteger &a,int b){
  a = a+b;
  return a;
}

BigInteger &operator ++ (BigInteger &a){
  a = a + BigInteger(1);
  return a;
}

BigInteger operator - (const BigInteger &a,const BigInteger &b){
  return a + (- b); 
}

BigInteger operator * (const BigInteger &a,const BigInteger &b){
  int len = a.size() + b.size() + 2;
  int sign = a.sig()*b.sig();

  std::vector<char> v(len);

  for(int i=0;i<a.size();i++){
    if(a[i] == 0) continue;
    for(int j=0;j<b.size();j++){
      v[i+j] += a[i]*b[j];
      if(v[i+j] >=10){
        v[i+j+1] = v[i+j]/10;
        v[i+j]%=10;
      }
    }
  }

  int pos=v.size();
  while(pos!=1 && v[pos-1]==0) pos--;
  if(pos != v.size()) v.resize(pos);

  return BigInteger(v,sign);
}

BigInteger operator * (const BigInteger &a,int b){
  return a*BigInteger(b);
}

BigInteger &operator *= (BigInteger &a,const BigInteger &b){
  a = a*b;
  return a;
}
BigInteger &operator *= (BigInteger &a,int b){
  a = a*b;
  return a;
}

BigInteger reverse(const BigInteger &a){
  BigInteger b=a;
  std::reverse(b.nums.begin(),b.nums.end());
  return b;
}

BigInteger power(BigInteger a,int b){
  if(b == 0) return BigInteger(1);
  if((b&1) != 0){
    return a*power(a*a,b>>1);
  }else{
    return power(a*a,b>>1);
  }
}

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