#include<bits/stdc++.h>//submitRecord//
using namespace std;
//const int N=1e7+10;
long long f(int x){
if(x<=10) return x;
else return f(x-10)*f(x-1);
}
int main(){
//freopen("","r",stdin);
//freopen("","w",stdout);
ios::sync_with_stdio();
cin.tie(nullptr);
cout.tie(nullptr);
long long a;
cin>>a;
cout<<f(a);
//fclose(stdin);
//fclose(stdout);
return 0;
}