#include <iostream>
#define INF 2000000000
using namespace std;
int x, n, i, maxx=-INF, sec, nr;
int main()
{
cin >> n;
cin >> x;
if(x % 2 == 0) sec = 1;
else sec = 0;
for(i = 2; i <= n; i ++)
{
cin >> x;
if(x % 2 == 0)
{
sec ++;
if(sec > maxx) maxx = sec;
} else sec = 0;
}
cout << maxx;
return 0;
}