• + 0 comments
    if __name__ == '__main__':
        n = int(input().strip())
        bin_number = str(int(bin(n)[2:]))
        count = 0
        max_ls = 0
        for i in range(0, len(str(bin_number))):
            if bin_number[i] == '1':
                count +=1
                if max_ls < count:
                    max_ls= count
            elif bin_number[i] == '0':
                count = 0
        if count > max_ls:
            print(count)
        else:
            print(max_ls)