#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{
int contador=1;
long factorial=1;
while(contador<=num){
factorial*=contador;
contador++;
}
cout<<factorial<<endl;}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbnVtOwogICAgY291dDw8ImluZ3Jlc2UgZWwgbnVtZXJvOiAiPDxlbmRsOwogICAgIGNpbj4+bnVtOwogICAgIGlmKG51bT09MCB8fCBudW09PTEpewogICAgICAgIGNvdXQ8PCIxIjw8ZW5kbDt9CmVsc2V7CiAgICAgICAgaW50IGNvbnRhZG9yPTE7CiAgICAgICAgIGxvbmcgZmFjdG9yaWFsPTE7CiAgICAgICAgIHdoaWxlKGNvbnRhZG9yPD1udW0pewogICAgICAgICBmYWN0b3JpYWwqPWNvbnRhZG9yOwogICAgICAgIGNvbnRhZG9yKys7Cn0KY291dDw8ZmFjdG9yaWFsPDxlbmRsO30KCglyZXR1cm4gMDsKfQ==