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