#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int a[100050] = {};
for (int i = 0; i < n; i++)
{
cin >> a[i];
}
int t = 1, mt = 1;
for (int i = 1; i < n; i++)
{
if (a[i] == a[i - 1])
{
t++;
if (t > mt)
mt = t;
}
else
{
t = 1;
}
}
cout << mt;
return 0;
}