r=0 gets.each_char do |s| r+=s.to_i end p r