#include <stdio.h>
#include <string.h>
int main(){
char x;
int sum=0,y=0,ans=0,i,z;
while(scanf("%s",x)!=EOF){
z=x-'0';
if(z>=0 && z<=9){
if(y==0){sum*=10;}sum+=z;y=0;
}else{y=1; ans+=sum; sum=0;}
}
if(sum!=0){
	ans+=sum;}
printf("%d\n",ans);
return 0;
}