n=int(input("")) db=0 while n>0: if n%2==1: db=db+1 n=int(n/2) print(db)