#include <bits/stdc++.h> 
using namespace std;
int main() 
{ 
	freopen ("tinhtong.inp", "r", stdin);
	freopen ("tinhtong.out", "w", stdout);
	char str[50]; 
    int i=0,j,tong=0,n; 
    cin.getline(str,50); 
    while(i<=strlen(str)-1) 
        {if(str[i]<='9' && str[i]>='0') 
        { 
            j=i; 
            n=0;            
            while(j<=strlen(str)-1 && (str[j]<='9' && str[j]>='0')) 
            { 
            	n=10*n+(int)str[j]-48; 
            	j++;             
			} 
            tong+=n; 
            i=j; 
        } 
        else i++; 
        }
	cout<<tong;
}

