using System;
public class Program
{
public static void Main()
String st = "1111111111111001111011111";
int maxcount = 0;
int currentcount = 0;
foreach(char c in st)
if(c == '1')
currentcount++;
if(currentcount > maxcount)
maxcount = currentcount;
}
else
currentcount = 0;
Console.WriteLine("the Maximum number of consecutive 1's = " + maxcount);