import std.stdio;
import std.conv;
import std.string;
void main(){
  string back="+";
  int ans=0,num;
  while(num=to!int(chomp(readln())),1){
    if(back=="+") ans+=num;
    else if(back=="-") ans-=num;
    else if(back=="*") ans*=num;
    else if(back=="/") ans/=num;
    back=chomp(readln());
    if(back=="="){writeln(ans);break;}
  }
}