#include <bits/stdc++.h>
using namespace std;
int sta[100005], fin[100005], a[100005];
int main() {
  memset(sta, 0, sizeof(sta));
  memset(fin, 0, sizeof(fin));
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sta[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (a[i] > a[i - 1])
      sta[i] = sta[i - 1] + 1;
    else
      sta[i] = 1;
  }
  fin[n] = 1;
  for (int i = n - 1; i >= 1; i--) {
    if (a[i] < a[i + 1])
      fin[i] = fin[i + 1] + 1;
    else
      fin[i] = 1;
  }
  int ans, ansnew = 1;
  a[0] = 0, a[n + 1] = 666666;
  for (int i = 1; i <= n; i++) {
    ans = sta[i - 1] + fin[i + 1] + 1;
    if (a[i + 1] - a[i - 1] < 2) ans = max(sta[i], fin[i]) + 1;
    ansnew = max(ansnew, ans);
  }
  cout << ansnew << endl;
  return 0;
}
