IntermediateRating 1200
Sit Far From Everyone
A row of seats is written as 0 (empty) and 1 (taken), with at least one of each. Choose an empty seat that is as far as possible from the nearest person. Print that distance.
Input
A string of 0s and 1s.
Output
One integer.
Sample 1
Input
1000101
Output
2
Sample 2
Input
1000
Output
3
Output appears here