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

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;
}