python 一行

while True:
    try:
        print(len(max(bin(int(input()))[2:].split('0'),key=len)))
    except:
        break