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