#include <iostream>
#include <fstream>
#include<string>
#include<sstream>
#include<stdlib.h>
using namespace std;
int main()
{
	string s,k,kq;
	int tong=0;
	int j;
	ifstream fi("Bai5b.inp");
	getline(fi,s);
	fi.close();
	ofstream fo("Bai5b.out");
	for(int i=0;i<s.length();i++)
	{
		if((s[i]>='0')&&(s[i]<='9'))
		{
			k="";
			while(((s[i]>='0')&&(s[i]<='9'))&&(i<s.length()))
			{
				k=k+s[i];
				i++;
			}
			j=atoi(k.c_str());
			tong=tong +j;
		}
	}
    fo<<tong;
    fo.close();
    return 0;
}
