#include <iostream>
#include <string>
#include <queue>
#include <stack>

using namespace std;

int main(){
	int ans = 0;
	string str;
	while(cin>>str){
		int n=0;
		for(int i=0;i<str.size();i++){
			if('0'<=str[i] && str[i] <='9'){
				n+=str[i] - '0';
			}
			if( i+1 == str.size() ||'0'> str[i+1]  ||str[i+1]  > '9'){
				ans += n;
				n=0;
			}
			else{
				n*=10;
			}
		}
	}
	cout<<ans<<endl;
	return 0;

}

/*
Sample Input
Thereare100yenonthetable.Iam17yearsold.
Ishouldgohomeat6pm.
Output for the Sample Input
123
*/