#include <bits/stdc++.h>
using namespace std;
const int mxn = 2e5 + 10;
int a[mxn], lft[mxn], rit[mxn];
int main() {
  int n, res = 1, mx = 0, x;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = n - 1; i > 0; i--) {
    if (a[i] > a[i - 1]) {
      int cnt = 0;
      while (a[i] > a[i - 1]) {
        lft[i] = ++cnt;
        i--;
      }
      lft[i] = ++cnt;
      i++;
    }
  }
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      int cnt = 0;
      while (a[i] < a[i + 1]) {
        rit[i] = ++cnt;
        i++;
      }
      rit[i] = ++cnt;
      i--;
    }
  }
  for (int i = 0; i < n; i++) {
    if (!rit[i]) rit[i] = 1;
    if (!lft[i]) lft[i] = 1;
  }
  for (int i = 0; i < n; i++) {
    x = 0;
    if (a[i] < a[i + 2]) x = rit[i] + lft[i + 2];
    mx = max(mx, rit[i]);
    res = max(res, x);
  }
  cout << max(res, mx) << endl;
}
