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