import std.stdio;
import std.ascii;

void main() {
    int sum = 0;

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

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

    writeln(sum);
}