#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+bnVtOwogICAgIGlmKG51bT09MCB8fCBudW09PTEpewogICAgICAgICAgY291dDw8MTw8ZW5kbDsKICAgIH0gZWxzZXsKICAgICAgICAgbG9uZyBmYWN0b3JpYWw9MTsKICAgICAgICBmb3IoaW50IGk9MjsgaTw9bnVtO2krKyl7CiAgICAgICAgICAgIGZhY3RvcmlhbCo9aTsKICAgICAgICB9CiAgICAgICAgY291dDw8ZmFjdG9yaWFsPDxlbmRsOwp9CgoJcmV0dXJuIDA7Cn0=