import std.stdio;
import std.ascii;

void main() {
    int sum = 0;

    foreach (string input; stdin.lines) {
        auto num = 0;

        foreach (c; input) {
            if (c.isDigit) {
                num = (num * 10) + (c - '0');
            } else {
                sum += num;
                num = 0;
            }
        }
    }

    writeln(sum);
}