#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  ;
  long long n, i, j, x = 0, y, z, mx = -1, cnt = 0, k = 1, rmx = -1, t1 = 0, t2,
                     p = 0;
  long long a[210000], b[210000];
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  for (i = 1; i <= n; i++) {
    if (a[i] > mx) {
      mx = a[i];
      cnt++;
      t1 = 0;
    } else {
      b[k] = cnt;
      k++;
      rmx = max(cnt, rmx);
      cnt = 1;
      mx = a[i];
      t1 = 1;
    }
  }
  if (t1 == 0) {
    b[k] = cnt;
    k++;
    rmx = max(cnt, rmx);
  }
  b[k] = 0;
  k++;
  mx = -1;
  for (i = 1; i <= n; i++) {
    if (a[i] > mx) {
      mx = a[i];
    } else {
      x = i - 2;
      y = i + 1;
      p++;
      if (x > 0 && (a[i] > a[x])) {
        x = b[p] + b[p + 1] - 1;
        rmx = max(x, rmx);
      } else if (y <= n && (a[i - 1] < a[y])) {
        x = b[p] + b[p + 1] - 1;
        rmx = max(x, rmx);
      }
      mx = a[i];
    }
  }
  cout << rmx;
  return 0;
}
