#include <iostream>
#include <string>
using namespace std;

int main(){
    string str;
    getline(cin, str);
    int number = 0;
    int sum = 0;
    for(int i=0; i<=str.size(); ++i){
        if('0' <= str[i] && str[i] <= '9'){
            number *= 10;
            number += str[i] - '0';
        }else{
            sum += number;
            number = 0;
        }
    }
    cout << sum << endl;
    return 0;
}