#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;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbnVtOwoKY291dDw8ImluZ3Jlc2UgZWwgbnVtZXJvOiAiPDxlbmRsOwpjaW4+Pm51bTsKaWYobnVtPT0wIHx8IG51bT09MSl7CiAgICAgIGNvdXQ8PCIxIjw8ZW5kbDt9CmVsc2V7CiAgICAgbG9uZyBmYWN0b3JpYWw9MTsKICAgICBmb3IoaW50IGk9MjsgaTw9bnVtO2krKyl7CiAgICAgICAgIGZhY3RvcmlhbCo9aTsKICAgICB9CiAgICBjb3V0PDxmYWN0b3JpYWw8PGVuZGw7Cn0KCglyZXR1cm4gMDsKfQ==