#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  if (n == 1) {
    cout << "1\n";
    return 0;
  }
  int a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  int b[n], bi[n];
  b[0] = 1;
  bi[n - 1] = 1;
  int ans = 0;
  for (long long i = 1; i < n; i++) {
    b[i] = 1;
    if (a[i] > a[i - 1]) b[i] += b[i - 1];
    ans = max(ans, b[i]);
  }
  for (int i = n - 2; i >= 0; i--) {
    bi[i] = 1;
    if (a[i] < a[i + 1]) bi[i] += bi[i + 1];
  }
  ans = max(ans, 1 + bi[1]);
  ans = max(ans, 1 + b[n - 2]);
  for (long long i = 1; i < n - 1; i++) {
    if (a[i - 1] < a[i + 1] && a[i + 1] - a[i - 1] >= 2) {
      ans = max(ans, b[i - 1] + bi[i + 1] + 1);
    } else {
      ans = max(ans, b[i - 1] + 1);
      ans = max(ans, bi[i + 1] + 1);
    }
  }
  cout << ans << "\n";
  return 0;
}
