There are bulbs arranged in a row. The state of the bulbs is represented by a binary string bulbs of length , the at position in the string represents the bulb is OFF and represents the bulb is ON, where . You have to switch OFF all the bulbs by performing following operation atmost times. The operation is defined as:-
The task is to find the smallest value of greater than zero, such that you can turn OFF all the bulbs in atmost operations.
Input format
Output format
The output contains a single integer, the minimum possible value of greater than zero such that you are able to turn OFF all the bulbs in atmost operations.
Constraints
For l = 1, The operation can be perfomed by choosing following intervals
For l = 2, The operation can be perfomed by choosing following intervals
For l = 3, The operation can be perfomed by choosing following intervals
Hence the answer is 3.