#include <iostream>
#include<fstream>
#include<string>

using namespace std;

int main()
{
	ifstream fin("input.txt");
	ofstream fout("output.txt");

	string s;
	fin>>s;
	if (s[0]!='-') s="+"+s;
	long long r=0, a=0;
	int i=0;
	while (i<s.length())
	{
		if (s[i]=='-')
		{
			i++;
			if (i+1<s.length() && s[i+1]=='0')
				a=0;
			else a=-(s[i]-'0');
			i++;
			long long b=0;
			while(i<s.length() && s[i]!='+' && s[i]!='-')
				b=b*10+s[i++]-'0';
			r+=a+b;
		}
		else  //if (s[i]=='+')
			{
				i++;
				long long b=0;
				while(i<s.length() && s[i]!='+' && s[i]!='-')
					b=b*10+s[i++]-'0';
				r+=b;
			}
	}

	fout<<r;

	fin.close();
	fout.close();
	return 0;
}

