https://www.acmicpc.net/problem/1094
n=int(input())
sum=64
a=64
count=1
if n==64:
print("1")
else:
for i in range(7):
if sum-int(a/2)>n:
sum-=int(a/2)
elif sum-int(a/2)<n:
count+=1
a/=2
print(count)