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