#include <bits/stdc++.h>
using namespace std;
template <class T>
void rdNum(T &n) {
  T x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  n = x * f;
}
const int maxN = 1e5 + 10;
const int inf = 1e9 + 10;
int a[maxN], cnt[maxN];
int n;
int main() {
  while (~scanf("%d", &n)) {
    for (int i = 1; i <= n; i++) rdNum(a[i]);
    if (n <= 2) {
      printf("%d\n", n);
      continue;
    }
    int rs = 2;
    a[0] = a[n + 1] = 0;
    int ln = 0;
    for (int i = 1; i <= n + 1; i++) {
      if (a[i] > a[i - 1])
        ln++;
      else {
        if (ln > rs) rs = ln;
        int p = i - 1;
        int c = ln;
        while (c) cnt[p] = ln, p--, c--;
        ln = 1;
      }
    }
    a[n + 1] = inf;
    cnt[n + 1] = 0;
    for (int i = 1; i <= n - 1; i++) {
      if (a[i + 1] <= a[i]) {
        int p = a[i] + 1;
        int tmp = cnt[i] + 1;
        if (a[i + 2] > p) tmp += cnt[i + 2] - (cnt[i + 1] > 1);
        if (tmp > rs) rs = tmp;
      }
    }
    a[0] = 0;
    cnt[0] = 0;
    for (int i = n; i >= 2; i--) {
      if (a[i] <= a[i - 1]) {
        int p = a[i] - 1;
        int tmp = cnt[i] + 1;
        if (a[i - 2] < p) tmp += cnt[i - 2] - (cnt[i - 1] > 1);
        if (tmp > rs) rs = tmp;
      }
    }
    printf("%d\n", rs);
  }
  return 0;
}
