#include <bits/stdc++.h>
using namespace std;
string s;
int f[1000000],x,c[100000],i,ahihi,a[1000000],m;
int carry,t=0;
bool check(char a)
{
    return '0'<=a&&a<='9';
}
int main()
{
    freopen("Bai5b.inp","r",stdin);
    freopen("Bai5b.out","w",stdout);
    getline(cin,s);
    for (int i=0;i<s.size()-1;++i)
    {
        if (!check(s[i]))
        {
            s[i]=' ';
        }
    }
    istringstream ss(s);
    while (ss>>a[m])
    {
        m++;
    }
    for (int i=0;i<m;++i)
    {
        ahihi=ahihi+a[i];
    }
    cout<<ahihi;
}

