def get_ans(s):
    mark=str(bin(s))
    return mark.count('1')

if __name__=='__main__':
#输入一个数/字符串
    s_in=int(input())
    print(get_ans(s_in))