• + 1 comment

    if name == 'main':

    n = int(input().strip())
    binary = bin(n)[2:]
    max_consecutive = max(len(ones) for ones in binary.split('0'))
    print(max_consecutive)