#include <bits/stdc++.h>
using namespace std;
int a[100010], diff[100010];
int main() {
  int i, j, k, n, neg1, neg2, pos, ans, mx = -1, df, d;
  cin >> n;
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < n - 1; i++) {
    diff[i] = a[i] - a[i + 1];
  }
  i = 0;
  while (i < n - 1) {
    neg1 = neg2 = pos = ans = d = 0;
    while (i < n - 1 && diff[i] < 0) {
      neg1++;
      i++;
    }
    while (i < n - 1 && diff[i] >= 0) {
      pos++;
      i++;
    }
    if (pos) {
      if (pos == 1) {
        if ((i + 1 < n && a[i + 1] - a[i - 1] > 1) ||
            (i - 2 >= 0 && a[i] - a[i - 2] > 1)) {
          j = i;
          while (j < n - 1 && diff[j] < 0) {
            neg2++;
            j++;
          }
        }
        ans = neg1 + neg2 + 1;
        d = 1;
      } else {
        ans = neg1 + 1;
        d = 1;
      }
    } else {
      ans = neg1;
      d = 0;
    }
    if (ans > mx || ((ans == mx) && (d == 0))) {
      mx = ans;
      df = d;
    }
  }
  if (n < 3)
    cout << n;
  else if (mx == 0)
    cout << "2";
  else {
    if (df == 0 && mx + 1 < n)
      cout << mx + 2;
    else
      cout << mx + 1;
  }
  return 0;
}
