n = int(input()) sc = 0 ans = 0 l = str(bin(n)) for j in l[2:]: if j == '1' : ans+=1 print(ans)