#include <iostream> using namespace std; int main() { int a; while(cin>>a){ getchar(); char c; cin>>c; if(c=='+'){ int b; cin>>b; cout<<a+b<<endl; }else if(c=='-'){ int b; cin>>b; cout<<a-b<<endl; }else if(c=='*'){ int b; cin>>b; cout<<a*b<<endl; }else if(c=='/'){ int b; cin>>b; if(b==0) cout<<"error"<<endl; else cout<<a/b<<endl; }else if(c=='%'){ int b; cin>>b; if(b==0) cout<<"error"<<endl; else cout<<a%b<<endl; }else{ int res=1; for(int i=1;i<=a;i++) res*=i; cout<<res<<endl; } } return 0; }