You are given a binary string of length consisting only of 0 and 1. The first character of is always 0.
You may perform the following operation any number of times.
1s must be exactly one greater than the number of 0s.1 inside the chosen substring and change it to 0.Among all strings obtainable after performing the operation zero or more times, find the minimum possible number of 1s.
The input is given from Standard Input in the following format:
For each test case, print one line containing the minimum possible number of 1s in an obtainable string.
The first test case initially contains no 1.
In the second test case, the whole string 011 can be chosen and one 1 can be changed to 0.
In the third and fourth test cases, it is impossible to obtain a string with fewer 1s than the printed value.
Each case is given in the following format:
0 or 1 ().| 3 | 60 | No additional constraints. |