s = int(input())

x = bin(s)[2:]

t = x.split('0')

l = sorted(t, key= lambda x: len(x), reverse=True)
print(len(l[0]))