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

int change(char c);

int main(){
    string inp;
    int ans = 0;
    while(cin >>inp){
        int keta = 1;
        for(int i = (inp.size() - 1); i >= 0; i--){
            if(isdigit(inp[i]) != 0){
                int tmp = change(inp[i]);
                ans += (tmp * keta);
                keta *= 10;
            } else if(keta != 1){
                keta = 1;
            }
        }
    }
    cout <<ans <<endl;
    return 0;
}

int change(char c){
    return (c - '0');
}