#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int a[maxn], l[maxn], r[maxn], n;
void init() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
}
void doit() {
  init();
  l[0] = r[n + 1] = 0;
  a[0] = 0;
  a[n + 1] = 1e9 + 10;
  for (int i = 1; i <= n; i++) {
    if (a[i] > a[i - 1])
      l[i] = l[i - 1] + 1;
    else
      l[i] = 1;
  }
  for (int i = n; i >= 1; i--) {
    if (a[i] < a[i + 1])
      r[i] = r[i + 1] + 1;
    else
      r[i] = 1;
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    ans = max(ans, l[i]);
  }
  for (int i = 2; i < n; i++) {
    if (a[i + 1] - a[i - 1] >= 2) ans = max(l[i - 1] + r[i + 1] + 1, ans);
  }
  for (int i = 1; i < n; i++) {
    ans = max(ans, l[i] + 1);
  }
  for (int i = n; i > 1; i--) {
    ans = max(ans, r[i] + 1);
  }
  printf("%d\n", ans);
}
int main() {
  doit();
  return 0;
}
