# Given a base- integer, , convert it to binary (base-). Then find and print the base- integer denoting the maximum number of consecutive 's in 's binary representation.



#!/bin/python3

import math
import os
import random
import re
import sys
if __name__ == '__main__':
    n = int(input())
    count = 0
    while n:
        n &= n << 1
        count += 1

    print(count)
