#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<cstring>
#include<vector>
using namespace std;
int main(){
    char str;
    bool flg = true;
    int sum = 0;
    string ans;
    while(cin >> str){
        if(str >= '0' && str <= '9'){
            if(flg){
                ans += str;
            }
            else{
                ans = str;
                flg = 1;
            }
        }
        else{
            if(flg){
                sum += atoi(ans.c_str());
            }
            flg = false;
        }
    }
    if(flg){
        sum += atoi(ans.c_str());
    }
    printf("%d\n",sum);
	return 0;
}