#include <bits/stdc++.h>
using namespace std;
int d[200000];
int st[200000];
int fin[200000];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> d[i];
  }
  st[n] = 1;
  for (int i = n - 1; i >= 1; i--) {
    if (d[i] < d[i + 1]) {
      st[i] = st[i + 1] + 1;
    } else {
      st[i] = 1;
    }
  }
  fin[1] = 1;
  int ans = 1;
  for (int i = 2; i <= n; i++) {
    if (d[i] > d[i - 1]) {
      fin[i] = fin[i - 1] + 1;
    } else {
      fin[i] = 1;
    }
    if (fin[i] == n) {
      ans = max(ans, fin[i]);
    } else {
      ans = max(ans, fin[i] + 1);
    }
  }
  for (int i = 2; i <= n - 1; i++) {
    if (d[i + 1] - d[i - 1] >= 2) {
      ans = max(ans, st[i + 1] + fin[i - 1] + 1);
    }
  }
  cout << ans;
  return 0;
}
