#include<iostream>
#include<fstream>
#include<string>
using namespace std;
int main()
{
char c1, c2;
int i, k, max;
ifstream file("path to a file");
ofstream fout("path to a file");
c1 = '0';
c2 = '0';
k = 1;
max = 1;
while (!file.eof())
{
c2 = c1;
fout << c1;
if (c1 != c2 || c2 != '0' || c1 != '0')
{
k == k + 1;
}
else if(k>max)
{
max == k;
k == 1;
}
}
if (k > max)
{
max == k;
}
cout << max;
return 0;
}