a = int(input())
count = 1
sum = 0
x = 64
while True:
    if a - x == 0:
        print(count)
        break
    if a - x / 2 == 0:
        print(count)
        break
    x /= 2
    if a > x:
        a -= x
        count += 1

4ad84ffc9cc5f875ea7019f7072f0eac2063fcb3
<mask token>

<mask token>
while True:
    if a - x == 0:
        print(count)
        break
    if a - x / 2 == 0:
        print(count)
        break
    x /= 2
    if a > x:
        a -= x
        count += 1

a = int(input())
count = 1
sum = 0
x = 64
while True:
    if a - x == 0:
        print(count)
        break
    if a - x / 2 == 0:
        print(count)
        break
    x /= 2
    if a > x:
        a -= x
        count += 1
