#include <bits/stdc++.h>
#define ll long long
using namespace std;
int a[100005];
int main()
{
int n; cin >> n;
for(int i = 0; i < n; ++i)
cin >> a[i];
int cnt = 1, maxi = -1e9;
for(int i = 1; i < n; ++i)
{
if(a[i] != a[i - 1]) ++cnt;
else {
maxi = max(maxi, cnt);
cnt = 1;
}
}
cout << max(maxi, cnt);
}
//Tìm độ dài dãy tăng dài nhất
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgbGwgbG9uZyBsb25nCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgYVsxMDAwMDVdOwppbnQgbWFpbigpCnsKICAgIGludCBuOyBjaW4gPj4gbjsgCiAgICBmb3IoaW50IGkgPSAwOyBpIDwgbjsgKytpKQogICAgICAgIGNpbiA+PiBhW2ldOyAKICAgIGludCBjbnQgPSAxLCBtYXhpID0gLTFlOTsKICAgIGZvcihpbnQgaSA9IDE7IGkgPCBuOyArK2kpCiAgICB7CiAgICAgICAgaWYoYVtpXSAhPSBhW2kgLSAxXSkgKytjbnQ7IAogICAgICAgIGVsc2UgewogICAgICAgICAgICBtYXhpID0gbWF4KG1heGksIGNudCk7CiAgICAgICAgICAgIGNudCA9IDE7CiAgICAgICAgfQogICAgfQogICAgY291dCA8PCBtYXgobWF4aSwgY250KTsKfQovL1TDrG0gxJHhu5kgZMOgaSBkw6N5IHTEg25nIGTDoGkgbmjhuqV0Cg==