#include <iostream>
using namespace std;
int main() {
int num;
cout<<"ingrese el numero: "<<endl;
cin>>num;
if(num==0 || num==1){
cout<<"1"<<endl;
} else{
long factorial=1;
for(int i=2; i<=num;i++){
factorial*=i;
}
cout<<factorial<<endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbnVtOwogICAgY291dDw8ImluZ3Jlc2UgZWwgbnVtZXJvOiAiPDxlbmRsOwogICAgIGNpbj4+bnVtOwogICAgIGlmKG51bT09MCB8fCBudW09PTEpewogICAgICAgICAgY291dDw8IjEiPDxlbmRsOwogICAgfSBlbHNlewogICAgICAgICBsb25nIGZhY3RvcmlhbD0xOwogICAgICAgIGZvcihpbnQgaT0yOyBpPD1udW07aSsrKXsKICAgICAgICAgICAgZmFjdG9yaWFsKj1pOwogICAgICAgIH0KICAgICAgICBjb3V0PDxmYWN0b3JpYWw8PGVuZGw7Cn0KCglyZXR1cm4gMDsKfQ==