#include <bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
#define repr(i,a,n) for(int i=a;i>=n;i--)
#define INF 999999999
#define INF_M 2147483647
#define pb(a) push_back(a)
using namespace std;
typedef pair<int, int> pii;
typedef long long int ll;
 
int main() {
    string s;
    int ans = 0;
    while(getline(cin,s)) {
        int a = 0;
        repr(i,s.length() - 1,0) {
            if('0' <= s[i] && s[i] <= '9') {
                ans += ((int)s[i] - 48) * pow(10,a);
                a++;
            }
            else a = 0;
        }
    }
    cout << ans << endl;
    return 0;
}