n = int(input()) byte_x = bin(n)[2:] ls = sorted(set(byte_x.split('0')),key = lambda x:len(x)) print(len(ls[-1]))