# your code goes here s=STDIN.gets.chomp a=s.scan(/[\d]+/) ans=0 a.each do |b| b.size.times do |i| c=b[i] ans+=c.to_i end end puts ans