#include <iostream>
#include <string>
using namespace std;

int main(){
	string hyu, num;
	int len, ans=0, z;
	while(cin >> hyu){
		len = hyu.size();
		for(int i=0;i<len;i++){
			z = hyu[i];
			if(z>=48&&z<=57){
				num += hyu[i];
			}
			else {
				try
				{
					ans += stoi(num);
				}
				catch (const std::exception&)
				{}
				num = "";
			}
		}
	}
	cout << ans << endl;
	return 0;
}