#include<bits/stdc++.h>
using namespace std;
int so(string st)
{
    int val;
    stringstream (st)>>val;
    return val;
}
int main()
{
    ifstream fi("bai5.inp");
    ofstream fo("bai5b.out");
    string s;
    getline(fi,s);
    int tg=0;
    int i=0;
    while (i<s.length())
    {
        if(s[i]>'0' && s[i]<='9')
        {
            string st="";
            while (s[i]>='0' && s[i]<='9')
            {
                st=st+s[i];
                i++;
            }
            tg=tg+so(st);
        }
        else
        {
            i++;
        }
    }
    fo<<tg;
}
