#include <bits/stdc++.h>
using namespace std;
int F[100010][2], A[100010];
int n, r = 1;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", A + i);
  F[1][0] = F[1][1] = 1;
  A[0] = -1;
  for (int i = 2; i <= n; ++i) {
    F[i][0] = 1;
    F[i][1] = 1;
    if (A[i] > A[i - 1]) F[i][0] += F[i - 1][0], F[i][1] += F[i - 1][1];
    if (A[i] > A[i - 2] + 1) F[i][1] = max(F[i][1], F[i - 2][0] + 2);
    F[i][1] = max(F[i][1], 2);
    r = max(r, F[i][0] + 1);
    r = max(r, F[i][1]);
  }
  printf("%d", min(r, n));
  return 0;
}
