Programmers' kids solve this riddle in 5-10 minutes. How fast can you do it?
The input contains a single integer *n* (0 ≤ *n* ≤ 2000000000).
none
11
2
14
0
61441
2
571576
10
2128506
3
0
1
2000000000
4
143165576
14
1741
2
1919020031
3
1795248373
5
1818960378
5
1285316221
3
1309028227
5
1304312649
8
1180540990
5
1204252996
3
1199537418
4
1075765759
2
724264821
5
747976826
4
624205168
4
619489590
4
643201595
5
638486017
6
514714359
3
833393692
3
186925426
4
210637432
4
58438190
4
from sys import stdin,stdout
# from os import _exit
# from bisect import bisect_left,bisect
# from heapq import heapify,heappop,heappush
# from sys import setrecursionlimit
# from collections import defaultdict,Counter
# from itertools import permutations
# from math import gcd,ceil,sqrt,factorial
# setrecursionlimit(int(1e5))
input,print = stdin.readline,stdout.write

n = hex(int(input()))[2:].upper()
val = {'0':1,'4':1,'6':1,'8':2,'9':1,'A':1,'B':2,'D':1}
ans = 0
for i in n:
    ans+=val.get(i,0)
print(str(ans)+"\n")
