
import std.stdio;
import std.ascii;
import std.conv;
import std.string;
import std.array;

void main() {
  int sum = 0;
  while(true) {
    string line = readln.chomp;
    bool prev_digit = false;
    string number = "";
    if (stdin.eof) break;
    foreach(x; line) {
      if (isDigit(x)) {
        number ~= x;
        prev_digit = true;
      }
      else if (prev_digit) {
        sum += number.to!(int);
        number = "";
        prev_digit = false;
      }
    }
    if (number != "") sum += number.to!(int);
  }
  writeln(sum);
}