#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<cmath>
#include<queue>
#include<stack>
#include<functional>
#include<string>
using namespace std;

int main(){
	string str;
	int ans=0;
	while(cin>>str){
		for(int i=0;i<str.length();i++){
			int num=0;
			for(;i<str.length() && isdigit(str[i]);i++){
				num = num*10+str[i]-'0';
			}
			ans+=num;
		}
	}
	printf("%d\n",ans);
    return 0;
}