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

int main()
{
	string str;
	int ans = 0;

	while (cin >> str){
		int num = 0;
		for (int i = 0; i < str.size(); i++){
			if ('0' <= str[i] && str[i] <= '9'){
				num *= 10;
				num += str[i] - '0';
			}
			else {
				ans += num;
				num = 0;
			}
		}
		ans += num;
	}

	cout << ans << endl;

	return (0);
}