using System;
public class Program
{
public static void Main()
//Find the maximum consecutive 1’s in an array of 0’s and 1’s.
//Input: 00110001001110
//Output: 3 (max num of 1s together is 3)
int []arr = {1,1,1,1,0,0,0,1,0,0,1,1,1,0, 0, 0, 1};
int lengthArr = arr.Length;
int count = 0;
int ans = 0;
for(int i = 0; i < lengthArr; i++)
if (arr[i] == 0)
count = 0;
}
else
count = count + 1;
if (ans < count)
ans = count;
Console.WriteLine(ans);