#include <bits/stdc++.h>
using namespace std;
const int NMAX = 100005;
int n, a[NMAX], dp[NMAX];
int l[NMAX], r[NMAX];
int main() {
  int i, maxim = 0;
  cin.sync_with_stdio(false);
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  l[1] = 1;
  for (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 (i = n - 1; i >= 1; i--)
    if (a[i] < a[i + 1])
      r[i] = r[i + 1] + 1;
    else
      r[i] = 1;
  for (i = 1; i <= n; i++) maxim = max(maxim, l[i - 1] + 1);
  for (i = n; i >= 1; i--) maxim = max(maxim, r[i + 1] + 1);
  for (i = 1; i <= n; i++)
    if (a[i + 1] > a[i - 1] + 1) maxim = max(maxim, l[i - 1] + 1 + r[i + 1]);
  cout << maxim << "\n";
  return 0;
}
