#include <bits/stdc++.h>
using namespace std;
struct sequence {
  int start;
  int end;
};
int main() {
  int n, e, ep, l = 0;
  vector<int> a;
  cin >> n;
  struct sequence seq[200000];
  bool flag = true;
  cin >> e;
  a.push_back(e);
  seq[l].start = 0;
  for (int i = 1; i <= n; ++i) {
    ep = e;
    cin >> e;
    a.push_back(e);
    if (e <= ep) {
      seq[l].end = i - 1;
      l++;
      seq[l].start = i;
    } else {
      flag = false;
    }
  }
  if (flag) {
    cout << 1;
    return 0;
  }
  if (seq[l].start != n) {
    seq[l].end = n;
    l++;
  }
  int max = 0;
  for (int i = 0; i < l; ++i) {
    if (seq[i].end - seq[i].start + 1 > max)
      max = seq[i].end - seq[i].start + 1;
  }
  int i;
  for (i = 0; i < l - 2; ++i) {
    int len[3];
    for (int j = 0; j < 3; ++j) len[j] = seq[i + j].end - seq[i + j].start + 1;
    if (a[seq[i].end - 1] < a[seq[i + 1].start] && len[0] > 1) {
      if (max < len[0] + len[1] - 1) max = len[0] + len[1] - 1;
    }
    if (a[seq[i].end] < a[seq[i + 1].start + 1] && len[1] > 1) {
      if (max < len[0] + len[1] - 1) max = len[0] + len[1] - 1;
    }
    if (len[1] == 1 && a[seq[i + 2].start] > a[seq[i].end]) {
      if (max < len[0] + len[2]) {
        max = len[0] + len[2];
      }
    }
  }
  int len[2];
  for (int j = 0; j < 2; ++j) len[j] = seq[i + j].end - seq[i + j].start + 1;
  if (a[seq[i].end - 1] < a[seq[i + 1].start] && len[0] > 1) {
    if (max < len[0] + len[1] - 1) max = len[0] + len[1] - 1;
  }
  if (a[seq[i].end] < a[seq[i + 1].start + 1] && len[1] > 1) {
    if (max < len[0] + len[1] - 1) max = len[0] + len[1] - 1;
  }
  cout << max;
  return 0;
}
