#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 5;
int a[N];
int pre[N];
int sub[N];
int main() {
  int n;
  while (~scanf("%d", &n)) {
    for (int i = 0; i < n; i++) scanf("%d", &a[i]);
    if (n == 1) {
      printf("1\n");
      continue;
    }
    int t = 0;
    pre[0] = 0;
    for (int i = 1; i < n; i++) {
      t++;
      pre[i] = t;
      if (a[i - 1] >= a[i]) t = 0;
    }
    t = 0;
    sub[n - 1] = 0;
    for (int i = n - 2; i >= 0; i--) {
      t++;
      sub[i] = t;
      if (a[i + 1] <= a[i]) t = 0;
    }
    int mx = 0;
    for (int i = 0; i < n; i++) {
      if (i == 0)
        t = sub[i] + 1;
      else if (i == n - 1)
        t = pre[i] + 1;
      else {
        if (a[i - 1] + 1 < a[i + 1])
          t = sub[i] + pre[i] + 1;
        else
          t = max(sub[i], pre[i]) + 1;
      }
      mx = max(t, mx);
    }
    printf("%d\n", mx);
  }
  return 0;
}
