#include <iostream>
#include <string>
#include <set>
#include <algorithm>
using namespace std;
set<char> s;


int main()
{
    string base = "0123456789";
    for (int i = 0; i < 10; i++) s.insert(base[i]);
    string str;
    int i, res = 0;
    while (cin >> str) {
        i = str.size()-1;
        while (i >= 0) {
            if (s.find(str[i]) != s.end()) {
                int t = 1;
                while (s.find(str[i]) != s.end() && i >= 0) {
                    res += int(str[i]-'0') * t;
                    t *= 10;
                    i--;
                }
            }
            i--;
        }
    }
    cout << res << endl;
    return 0;
}
