print("Enter no of elements")
n = int(input())
a = []

for i in range(n):
    num = int(input)
    a.append(num)

l = len(a)
c = 0
max = 0

for i in range(l):
    if a[i] == 1:
        c = c + 1
    if c > max:
        max = c
    if a[i] == 0:
        c = 0

print("Maximum no of consecutive 1's is:", max)