#include using namespace std; int main(){ long long n;cin>>n; if(n >= 50){ cout << "000000000000" << endl; return 0; } long long ans = 1; bool ok = false; for(long long i = 1; n >= i; i++){ ans = (ans*i); if(ans/1000000000000){ ok = true; ans %= 1000000000000; } } if(ok){ string s = to_string(ans); for(int i = 0; 12-s.size() > i; i++){ cout << '0'; } cout << s << endl; }else{ cout << ans << endl; } }