/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, OCamldxx dVB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <iostream>
#include <stack>
#include <queue>
#include <string>
using namespace std;
int main()
{
stack<char> s;
queue<char> q;
priority_queue<char> que;
string str;
cin>>str;
int k = 0;
for(char c : str){
if(s.empty()){
s.push(c);
k+=c-'0';
}
else if(s.top() == '+'){
k+=c-'0';
}
else if(s.top() == '-'){
k-=c-'0';
}
else{
s.push(c);
}
}
cout<<k;
return 0;
}
LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgoKV2VsY29tZSB0byBHREIgT25saW5lLgpHREIgb25saW5lIGlzIGFuIG9ubGluZSBjb21waWxlciBhbmQgZGVidWdnZXIgdG9vbCBmb3IgQywgQysrLCBQeXRob24sIEphdmEsIFBIUCwgUnVieSwgUGVybCwKQyMsIE9DYW1sZHh4IGRWQiwgU3dpZnQsIFBhc2NhbCwgRm9ydHJhbiwgSGFza2VsbCwgT2JqZWN0aXZlLUMsIEFzc2VtYmx5LCBIVE1MLCBDU1MsIEpTLCBTUUxpdGUsIFByb2xvZy4KQ29kZSwgQ29tcGlsZSwgUnVuIGFuZCBEZWJ1ZyBvbmxpbmUgZnJvbSBhbnl3aGVyZSBpbiB3b3JsZC4KCioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPHN0YWNrPgojaW5jbHVkZSA8cXVldWU+CiNpbmNsdWRlIDxzdHJpbmc+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBtYWluKCkKewogICAgc3RhY2s8Y2hhcj4gczsKICAgIHF1ZXVlPGNoYXI+IHE7CiAgICBwcmlvcml0eV9xdWV1ZTxjaGFyPiBxdWU7CiAgICBzdHJpbmcgc3RyOwogICAgY2luPj5zdHI7CiAgICBpbnQgayA9IDA7CiAgICBmb3IoY2hhciBjIDogc3RyKXsKICAgICAgICBpZihzLmVtcHR5KCkpewogICAgICAgICAgICBzLnB1c2goYyk7CiAgICAgICAgICAgIGsrPWMtJzAnOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmKHMudG9wKCkgPT0gJysnKXsKICAgICAgICAgICAgays9Yy0nMCc7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYocy50b3AoKSA9PSAnLScpewogICAgICAgICAgICBrLT1jLScwJzsKICAgICAgICB9CiAgICAgICAgZWxzZXsKICAgICAgICAgICAgcy5wdXNoKGMpOwogICAgICAgIH0KICAgIH0KICAgIGNvdXQ8PGs7CiAgICByZXR1cm4gMDsKfQ==