/******************************************************************************

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);
        }
    }
    return 0;
}