#include<bits/stdc++.h> using namespace std; int main() { int a; cin>>a; int s=1; for(int b=1;b<a;b++) { s*=b; } cout<<s; }