#include <bits/stdc++.h>
using namespace std;
int a[100007], b[100007], c[100007];
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i < n + 1; i++) cin >> a[i];
  for (int i = 1; i < n + 1; i++) {
    if (a[i] > a[i - 1])
      b[i] = b[i - 1] + 1;
    else
      b[i] = 1;
  }
  c[n] = 1;
  a[n + 1] = INT_MAX;
  for (int i = n - 1; i > 0; i--) {
    if (a[i + 1] > a[i])
      c[i] = c[i + 1] + 1;
    else
      c[i] = 1;
  }
  int mx = 0;
  for (int i = 1; i < n + 1; i++) {
    if (b[i] + 1 <= n)
      mx = max(mx, b[i] + 1);
    else
      mx = max(mx, b[i]);
    if (a[i - 1] + 1 < a[i + 1]) mx = max(mx, b[i - 1] + c[i + 1] + 1);
  }
  cout << mx << endl;
}
