#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, a[100005];
  int L[100005] = {0}, R[100005] = {0};
  cin >> n;
  for (int i = int(1); i <= int(n); ++i) cin >> a[i];
  if (n <= 2) {
    cout << n << endl;
    return 0;
  }
  L[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (a[i] > a[i - 1])
      L[i] = L[i - 1] + 1;
    else
      L[i] = 1;
  }
  R[n] = 1;
  for (int i = n - 1; i >= 1; i--) {
    if (a[i] < a[i + 1])
      R[i] = R[i + 1] + 1;
    else
      R[i] = 1;
  }
  a[0] = -1000000010;
  a[n + 1] = 1000000010;
  L[0] = 0;
  R[n + 1] = 0;
  int ans = -1;
  for (int i = 0; i <= n - 1; i++) {
    if (a[i] + 2 <= a[i + 2]) {
      ans = max(ans, L[i] + R[i + 2] + 1);
    } else {
      ans = max(ans, max(L[i] + 1, R[i + 2] + 1));
    }
  }
  cout << ans << endl;
  return 0;
}
