#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, res;
  cin >> n;
  res = n > 1 ? 2 : 1;
  long long* a = new long long[n];
  int *l = new int[n], *r = new int[n + 1];
  l[0] = 1;
  cin >> a[0];
  for (int i = 1; i < n; i++) {
    cin >> a[i];
    l[i] = 1;
    if (a[i] > a[i - 1]) l[i] += l[i - 1];
  }
  r[n] = 0;
  r[n - 1] = 1;
  for (int i = n - 2; i > -1; i--) {
    r[i] = 1;
    if (a[i] < a[i + 1]) r[i] += r[i + 1];
  }
  res = r[1] + 1;
  for (int i = 1; i < n; i++) {
    t = l[i - 1] > r[i + 1] ? l[i - 1] + 1 : r[i + 1] + 1;
    if (a[i - 1] < a[i + 1] - 1) t = l[i - 1] + 1 + r[i + 1];
    if (res < t) res = t;
  }
  cout << res << endl;
  return 0;
}
