#include<bits/stdc++.h>
using namespace std;
int main()
{
    int ans = 0;
    char str[100];
    while (cin >> str)
    {
        int len = strlen(str);
        for (int i = 0; i < len; i++)
        {
            int n = 0;
            while (str[i] != '\0' && isdigit(str[i]))
            {
                n = n*10 + str[i++] - '0';
            }
            ans += n;
        }
    }
    printf("%d\n", ans);
    return 0;
}