#include <iostream>
using namespace std;
int c;

int main(){
    
    cin >> c;
    int ans = c;
    for(;c > 0;){
        
        if(c-1 != 0){
              ans = ans *(c-1);
             }
       
        
        c--;
          }
          
          cout << ans;
    system("pause");
    return 0;
    }