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