using System;
using System.Linq;
public class Test
{ 
    public static void Main()
    { int ans=0;
           
        while(true){
            string str=Console.ReadLine();
            if(str==null){break;}
            string bef="";
            for(int i=0;i<str.Length;i++){
                char u=str[i];
                if(u=='0'||u=='1'||u=='2'||u=='3'||u=='4'||u=='5'||u=='6'||u=='7'||u=='8'||u=='9')
                {bef+=u;}
                else if(bef!=""){
                    ans+=int.Parse(bef);
                    bef="";
                }
                   
            }
            if(bef!=""){
            ans+=int.Parse(bef);
            bef="";
            	
            }
        }    
        Console.WriteLine(ans);
             
             
        
        // your code goes here
    }
}
