#include <iostream>
#include <vector>
#include <queue>
#include <string>
using namespace std;
int main(void)
{
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
string str;
cin >> str;
bool minus = false;
bool firstm = true;
int answer = 0;
string num;
for (int i = 0; i < str.size(); ++i)
{
if (i == str.size() - 1)
{
if (minus)
{
num += str[i];
int n = stoi(num);
answer -= n;
num.clear();
}
else
{
num += str[i];
int n = stoi(num);
answer += n;
num.clear();
}
}
if (str[i] == '-')
{
if (firstm)
{
firstm = false;
int n = stoi(num);
answer += n;
num.clear();
}
else
{
int n = stoi(num);
answer -= n;
num.clear();
}
minus = true;
}
else if (str[i] == '+')
{
if (minus)
{
int n = stoi(num);
answer -= n;
num.clear();
}
else
{
int n = stoi(num);
answer += n;
num.clear();
}
}
else
{
num += str[i];
}
}
cout << answer;
return 0;
}