#include <bits/stdc++.h>
using namespace std;
int n, x, x0 = 0, ans = 1, c = 0;
int main() {
  scanf("%d %d", &n, &x);
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    if (x != x0) {
      if (++c > ans) ans = c;
    } else
      c = 1;
    x0 = x;
  }
  printf("%d\n", ans);
  return 0;
}
