S = gets.chomp puts S.scan(/\d/).map(&:to_i).sum