There are A bulbs lined in a row numbered 1 to A, which are off initially. In one step, you can choose any bulb and turn it on.
If you turn a particular bulb on, the bulb 2 places to the right and 2 places to the left of this bulb would also turn on. Bulbs that are already on will not be affected.
Formally, if you turn on the bulb numbered X, it will also turn on the bulb numbered X - 2 (if it exists) and bulb numbered X + 2 (if it exists).
Find the minimum number of steps required to turn on all the bulbs.
1 <= A <= 109
One of the optimal way is to -
1. Turn on bulb numbered 1. It will also turn on bulb numbered 3. 2. Turn on 2.
We need to turn on the only bulb.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.