int main()
{
        string str;
        unsigned int x, sum = 0;

        while (cin >> str) {
                for (string::size_type i = 0; i < str.length(); i++) {
                        x = 0;
                        while (isdigit(str[i])) {
                                x = 10 * x + str[i] - '0';
                                i++;
                        }
                        if (x > 0) {
                                sum += x;
                        }
                }
        }
        cout << sum << '\n';

        return 0;
}

