s = gets.to_i.to_s(2) ans = 0 s.each_char { |c| ans += 1 if c == "1" } puts ans