#include <iostream>
using namespace std;
int tab[10];
int main() {
char znak;
int x, y;
while(cin >> znak >> x >> y) {
if(znak == 'z') {
tab[x] = y;
}
else if(znak=='+') {
cout << tab[x] + tab[y] << endl;
}
else if(znak=='-') {
cout << tab[x] - tab[y] << endl;
}
else if(znak=='*') {
cout << tab[x] * tab[y] << endl;
}
else if(znak=='/') {
cout << tab[x] / tab[y] << endl;
}
else if(znak=='%') {
cout << tab[x] % tab[y] << endl;
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IHRhYlsxMF07CgppbnQgbWFpbigpIHsKCQoJY2hhciB6bmFrOwoJaW50IHgsIHk7CgkKCXdoaWxlKGNpbiA+PiB6bmFrID4+IHggPj4geSkgewoJCWlmKHpuYWsgPT0gJ3onKSB7CgkJCXRhYlt4XSA9IHk7CgkJfQoJCWVsc2UgaWYoem5haz09JysnKSB7CgkJCWNvdXQgPDwgdGFiW3hdICsgdGFiW3ldIDw8IGVuZGw7CgkJfQoJCWVsc2UgaWYoem5haz09Jy0nKSB7CgkJCWNvdXQgPDwgdGFiW3hdIC0gdGFiW3ldIDw8IGVuZGw7CgkJfQoJCWVsc2UgaWYoem5haz09JyonKSB7CgkJCWNvdXQgPDwgdGFiW3hdICogdGFiW3ldIDw8IGVuZGw7CgkJfQoJCWVsc2UgaWYoem5haz09Jy8nKSB7CgkJCWNvdXQgPDwgdGFiW3hdIC8gdGFiW3ldIDw8IGVuZGw7CgkJfQoJCWVsc2UgaWYoem5haz09JyUnKSB7CgkJCWNvdXQgPDwgdGFiW3hdICUgdGFiW3ldIDw8IGVuZGw7CgkJfQoJfQoKCXJldHVybiAwOwp9