import std.stdio;
import std.string;
import std.conv;
import std.array;

void main() {
	string s;
	string op = "+";
	int res = 0;
	while(1) {
		s = readln();
		int a = to!int(chomp(s));

		if(op[0] == '+')
			res += a;
		else if(op[0] == '-')
			res -= a;
		else if(op[0] == '*')
			res *= a;
		else
			res /= a;

		op = readln();
		if(op[0] == '=')
			break;
	}

	writeln(res);
}