#include<string>
#include<algorithm>
using namespace std;
#define MAX 100
//阶乘
long long int f1(int n) {
long long int res = 1;
for (int i = 1; i <= n; i++) {
res *= i;
}
return res;
}
int main() {
int a, b;
char c;
while (cin >> a) {
cin >> c;
if (c == '!') {
cout << f1(a) << endl;
}
else {
cin >> b;
if (c == '+') {
cout << a + b << endl;
}
else if(c=='-'){
cout << a - b << endl;
}
else if (c == '*') {
cout << a * b << endl;
}
else if ((c == '/')&(b!=0)) {
cout << a / b << endl;
}
else if ((c == '%')&(b != 0)) {
cout << a % b << endl;
}
else {
cout << "error" << endl;
}
}
}
return 0;
}