Kasumi came to a grocery store and found out that a lineup of a popular product is quite parse. So, she decided to take an action so that every item is closely next to each other and no longer experiencing loneliness.
What is the minimum number of relocating operation to accomplish her mission? The lineup is provided as a -length string, where "1" indicates an item and "0" an empty slot.
5 00101
1
10 0100110011
2
3 111
0