import sys

if __name__=="__main__":
    num=int(input())
    binStr=str(bin(num)).lstrip("0b")
    print(binStr.count("1"))