#include <bits/stdc++.h>
using namespace std;
template <typename T>
T abs(T a) {
  return a < 0 ? -a : a;
}
const int INF = (int)1e9 + 111;
const double PI = 3.1415926535897932384626433832795;
const int N = 1e5 + 1111;
int l[N], r[N], n, a[N], mx;
set<int> s;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    l[i] = r[i] = 1;
  }
  for (int i = 2; i <= n; i++)
    if (a[i] > a[i - 1]) l[i] += l[i - 1];
  for (int i = n - 1; i >= 1; i--)
    if (a[i + 1] > a[i]) r[i] += r[i + 1];
  a[0] = INF;
  a[n + 1] = -INF;
  for (int i = 1; i <= n; i++) {
    if (a[i - 1] + 1 < a[i + 1])
      mx = max(mx, l[i - 1] + 1 + r[i + 1]);
    else
      mx = max(mx, max(l[i - 1], r[i + 1]) + 1);
  }
  printf("%d\n", mx);
  return 0;
}
