#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

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