# 20241014
# wujie
n = int(input())
b = bin(n)[2:].split('0')
#print(b)
print(len(max(b)))