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