The attendance record has 1 for present and 0 for absent. The principal is giving a prize for the longest run of consecutive present days.
Find the length of the longest run of consecutive 1s.
Input Format
The first line has n.
The second line has n values, each 0 or 1.
Output Format
Print the length of the longest streak of 1s.
Constraints
• 1 ≤ n ≤ 1000
Examples
Example 1
Input
8
1 1 0 1 1 1 0 1
Output
3
Explanation The longest run is the three 1s in the middle.
Example 2
Explanation Never present, so 0.
Example 3
Explanation Present every day: 4.
Acceptance
—
Accepted
0
Submissions
0