#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;

int main() {
	char a[81];
	int cn=0,i,s,k;
	while (cin >> a) {
     s=strlen(a); k=1;
	 for (i=s-1;i>=0;i--) { 
		 if (a[i]>='0' && a[i]<='9') {
			 cn+=k*(a[i]-'0');
			 k*=10;
		 }
		 else k=1;
	   }
	}
	cout << cn << endl;
	return 0;
}