//#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <utility>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

#define rep(i,l,n) for(int i=l;i<n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
using namespace std;
 
int main(){
    int ans=0;
    string s;
    while(cin>>s){
        rep(i,0,s.size()){
            if(s[i]-'0'>=0 && s[i]-'0'<10){
                rep(j,i,s.size()){
                    if(s[j]-'0'<0 || s[j]-'0'>=10 || j == s.size() - 1){
                    	if(j == s.size() - 1) j++;
                        ans+=atoi(s.substr(i,j-i).c_str());
                        //cout<<atoi(s.substr(i,j-i).c_str())<<endl;
                        i = j ;
                        break;
                    }
                }
            }
        }
    }
    o(ans);
}