#include<iostream>
#include<string>
using namespace std;

int main()
{
    int num=0;
    int ans = 0;
    char temp;
    while(cin >> temp)
    {
        if('0'<= temp &&temp<='9')
        {
            num = num*10 + (int)( temp-'0');
           // cout << temp;


        }

        else
        {
            ans+= num;
            num=0;
        }
    }
    ans += num;
    cout << ans << endl;
    return 0;
}