#include<cstdio>

int fun(int n){
    if(n ==1){
        return 1;
    }else{
        return n*fun(n-1);
    }
}
int main(){
    int a,b;
    char c;
    while(scanf("%d %c %d",&a,&c,&b) != EOF){
        switch(c){
            case '+' :
            printf("%d\n",a+b);
            break;
            case '-' :
            printf("%d\n",a-b);
            break;
            case '*' :
            printf("%d\n",a*b);
            break;
            case '/' :
            if(b == 0){
                printf("error\n");
            }else{
            printf("%d\n",a/b);
            }
            break;
            case '%' :
            if(b == 0){
                printf("error\n");
            }else{
            printf("%d\n",a%b);
            }
            break;
            case '!' :
            printf("%d\n",fun(a));
            break;
        }
    }
}