#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 25, M = 1e6 + 25, oo = 1e9 + 7, mxmsk = 1 << 16;
const long long OO = 1e18 + 25;
int c, d, a[N], b, n, t, e, mx;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  for (int i = 1; i < n; i++) {
    if (a[i] <= a[i - 1])
      c++;
    else
      c = 0;
    mx = max(c, mx);
  }
  printf("%d\n", mx);
  return 0;
}
