import std.stdio;
import std.string;
import std.conv;
import std.range;
import std.algorithm;

void main() {
    int sum = 0;

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

        foreach (c; input) {
            if (c >= '0' && c <= '9') {
                num = (num * 10) + (c - '0');
            } else {
                sum += num;
                num = 0;
            }
        }

    }

    writeln(sum);
}