/******************************************************************************
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;
int ans = 0;
char n = '+';
for(char c : str){
if(s.empty()){
s.push(c);
k+=c-'0';
}
else if(c!= '+' && c!= '-'){
k*=10;
k+=c-'0';
}
else{
if(n== '+'){
ans+=k;
}
else{
ans-=k;
}
k=0;
n=c;
}
}
cout<<ans;
return 0;
}
LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgoKV2VsY29tZSB0byBHREIgT25saW5lLgpHREIgb25saW5lIGlzIGFuIG9ubGluZSBjb21waWxlciBhbmQgZGVidWdnZXIgdG9vbCBmb3IgQywgQysrLCBQeXRob24sIEphdmEsIFBIUCwgUnVieSwgUGVybCwKQyMsIE9DYW1sZHh4IGRWQiwgU3dpZnQsIFBhc2NhbCwgRm9ydHJhbiwgSGFza2VsbCwgT2JqZWN0aXZlLUMsIEFzc2VtYmx5LCBIVE1MLCBDU1MsIEpTLCBTUUxpdGUsIFByb2xvZy4KQ29kZSwgQ29tcGlsZSwgUnVuIGFuZCBEZWJ1ZyBvbmxpbmUgZnJvbSBhbnl3aGVyZSBpbiB3b3JsZC4KCioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPHN0YWNrPgojaW5jbHVkZSA8cXVldWU+CiNpbmNsdWRlIDxzdHJpbmc+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBtYWluKCkKewogICAgc3RhY2s8Y2hhcj4gczsKICAgIHF1ZXVlPGNoYXI+IHE7CiAgICBwcmlvcml0eV9xdWV1ZTxjaGFyPiBxdWU7CiAgICBzdHJpbmcgc3RyOwogICAgY2luPj5zdHI7CiAgICBpbnQgayA9IDA7CiAgICBpbnQgYW5zID0gMDsKICAgIGNoYXIgbiA9ICcrJzsKICAgIGZvcihjaGFyIGMgOiBzdHIpewogICAgICAgIGlmKHMuZW1wdHkoKSl7CiAgICAgICAgICAgIHMucHVzaChjKTsKICAgICAgICAgICAgays9Yy0nMCc7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYoYyE9ICcrJyAmJiBjIT0gJy0nKXsKICAgICAgICAgICAgayo9MTA7CiAgICAgICAgICAgIGsrPWMtJzAnOwogICAgICAgIH0KICAgICAgICBlbHNlewogICAgICAgICAgICBpZihuPT0gJysnKXsKICAgICAgICAgICAgICAgIGFucys9azsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlewogICAgICAgICAgICAgICAgYW5zLT1rOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGs9MDsKICAgICAgICAgICAgbj1jOwogICAgICAgIH0KICAgIH0KICAgIGNvdXQ8PGFuczsKICAgIHJldHVybiAwOwp9