def numeric?(lookAhead)
  lookAhead =~ /[[:digit:]]/
end

sum=0
while l = STDIN.gets
  l.chomp!
  tmp=""
  l.chars.each do |c|
    if numeric?(c) then
      tmp+=c
    elsif tmp.size > 0 then
      sum += tmp.to_i
      tmp = ""
    end
  end
end

puts sum