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