Social distancing (distance)

Description


A terrible new disease, COVID-19, has begun to spread all over the world. People try to take as many precautions as possible to protect themselves from infection, one of which is to increase the "social distance" between people.
Now consider such a problem: There is a row of narrow seats in the waiting hall of a train station, with consecutive \(N\) seats in a straight line. Some of these seats are currently occupied and some are empty. After understanding the importance of "social distance" \(D\), later people hope to maximize \(D\), where \(D\) is the distance between the two nearest occupied seats. For example, if the seats 3 and 8 are the closest seats, then \(D=5\).
Recently, a new passenger came and wanted to find a seat. He needs to determine which previously vacant seat should be taken so that the final value of \(D\) is still as large as possible.
Note: Passengers who have already sat down cannot move.

Format


Input

The first line of input contains an integer \(N\), which represents the number of consecutive seats in a row.
The second line contains strings of length \(N\), 0 and 1, which describe the occupancy of the \(N\) seats, 0 means empty seats, and 1 means already occupied.
To simplify the problem, the string has at least one 0, so there is at least a seat for the new passenger, and at least one 1.

Output

Output an integer representing the maximum \(D\) after the new passenger is seated.

Sample


Input

14
10001001000010

Output

2

Hint


For the data of \(100\%\), \(2 \le N \le 100000\).

Sample Code


Code is not available!
posted @ 2020-10-14 01:16  Sample_Test  阅读(161)  评论(0编辑  收藏  举报