#include<iostream>
using namespace std;
int jiecheng(int n)
{
if(n==1)
return 1;
else
return n*jiecheng(n-1);
}
int main()
{
long int n,result;
while(cin>>n)
{
if(n==0) { cout<<n<<"! = 1"<<endl; continue;}
result = jiecheng(n);
cout<<n<<"! = "<<result<<endl;
}
return 0;
}
using namespace std;
int jiecheng(int n)
{
if(n==1)
return 1;
else
return n*jiecheng(n-1);
}
int main()
{
long int n,result;
while(cin>>n)
{
if(n==0) { cout<<n<<"! = 1"<<endl; continue;}
result = jiecheng(n);
cout<<n<<"! = "<<result<<endl;
}
return 0;
}