# 21:42- c = gets.to_s.chomp n = c.size ans = 0 1.upto(n-1){ |i| ans += 1 if c[i] != '0' } puts ans