#include #include using namespace std; #define REP(i,s,e) for (int i = s; i < e; i++) #define rep(i,n) REP(i,0,n) int main() { string s; cin >> s; int x, y, tmp; auto p = s.begin(); x = 1; if (*p == '+') p++; else if (*p == '-') { x = -1; p++; } for (tmp = 0;'0' <= *p && *p <= '9'; p++) tmp = tmp * 10 + *p - '0'; x *= tmp; y = 1; if (*p == '+') { y = -1; p++; } else if (*p == '-') p++; if (*p == '+') p++; else if (*p == '-') { y = -y; p++; } for (tmp = 0;'0' <= *p && *p <= '9'; p++) tmp = tmp * 10 + *p - '0'; y *= tmp; cout << x + y << endl; return 0; }