#include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <map>
#include <numeric>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()
#define print(s) cout << (s) << endl

int main() {
    string s = "";
    int cnt = 0;
    char c;
    bool isint = false;
    bool minus = false;
    while(cin >> c) {
        if (c >= '0' && c <= '9') {
            if (isint) {
                s += c;
                isint = true;
            }else if (!minus) {
                s = "";
                s += c;
                isint = true;
            }
        }else if (isint) {
            cnt += stoi(s);
            isint = false;
            if (c == '-') {
                minus = true;
            }else {
                minus = false;
            }
        }else {
            isint = false;
            if (c == '-') {
                minus = true;
            }else {
                minus = false;
            }
        }
    }
    if (s != "") {
        cnt += stoi(s);
    }
    cout << cnt << endl;
    return 0;
}