#include <iostream>
#include <vector>
#include <stack>
#include <set>
#include <string>
#include <algorithm>
using namespace std;
int main(void)
{
string s;
while (cin>>s) {
int t=0;
vector<int> ans;
char fu='#';
for (int i = 0; i <= s.size();i++) {
if (s[i] >= '0' && s[i] <= '9') {
t = t * 10 + s[i] - '0';
//cout << t << ':';
}
else {
if (ans.empty())ans.push_back(t);
else {
if (fu == '+')ans[0] = ans[0] + t;
else ans[0] = ans[0] - t;
}
fu = s[i];
t = 0;
}
}
cout << ans[0] << endl;
}
return 0;
}