Question
One Emergency Lamp Switch

A tunnel has N lamps. Each lamp is either working (1) or broken (0). The maintenance team can temporarily fix at most one broken lamp. Find the longest continuous bright segment possible after this one fix.

The intuition trap: you do not need to actually flip every zero and test again.

Input

The first line contains KaTeX can only parse string typed expression. For each test case, the first line contains KaTeX can only parse string typed expression. The second line contains KaTeX can only parse string typed expression binary integers.

Output

For each test case, print the maximum length of a continuous segment containing only KaTeX can only parse string typed expressions after flipping at most one KaTeX can only parse string typed expression.

Example
Example 1:
Input
1

8
1 1 0 1 1 0 1 1
Output
5


Example 2:
Input
1

5
0 0 0 0 0
Output
1

Online