Problem Description

Read n bits (0/1). Compute longest consecutive 1s length.

Input Format

First line n. Second line n bits.

Output Format

One integer maxLen.

Sample Test Case

Input:
10 1 1 0 1 1 1 0 1 1 0
Output:
3

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next