Your friend has just accused you of having good gacha luck. To prove them wrong, you have been keeping track of the results of every gacha pull over the past few months in a spreadsheet. Specifically, your spreadsheet contains
- The score is initially set to be the number of
s in the subsection. - Then, for each
in the subsection, the unluckiness score is halved without rounding. - Finally, the score is set to be the smallest integer that is no smaller than its current value.
To refute their claim as effectively as possible, you will send them
Constraints
Subtask 1 [1/15]
Subtask 2 [1/15]
Subtask 3 [2/15]
Subtask 4 [5/15]
Subtask 5 [3/15]
Subtask 6 [3/15]
No additional constraints.
Input Specification
The first line contains
The second line contains a binary string of length
Output Specification
Output a single integer on its own line, the maximum possible total unluckiness score of the
Sample Input
9 2
001000100
Sample Output
5
Explanation
One optimal solution would be to include the first
Comments