#include<stdio.h>
int main()
{
	int r=0,j,i;
	char s[128];
	while(scanf("%s",s)!=EOF){
		j=0;
		i=0;
		while(s[i]!=0){
			if(s[i]>='0'&&s[i]<='9'){
				j*=10;
				j+=(s[i]-'0');
			}else{
				r+=j;
				j=0;
			}
			i++;
		}

	}
	printf("%d\n",r);
	return 0;
}