#include <bits/stdc++.h>
const int MAX_N = 100000 + 10;
int n;
int a[MAX_N], pre[MAX_N], suf[MAX_N];
void solve() {
  for (int i = 1; i <= n; ++i) {
    pre[i] = 1;
    if (i > 1 && a[i] > a[i - 1]) pre[i] = pre[i - 1] + 1;
  }
  for (int i = n; i >= 1; --i) {
    suf[i] = 1;
    if (i < n && a[i] < a[i + 1]) suf[i] = suf[i + 1] + 1;
  }
  int ans = 2;
  for (int i = 1; i < n; ++i)
    if (a[i] < a[i + 1]) {
      ans = std::max(ans, pre[i] + suf[i + 1] + 1);
    }
  for (int i = 2; i < n; ++i)
    if (a[i - 1] + 1 < a[i + 1]) {
      ans = std::max(ans, pre[i - 1] + suf[i + 1] + 1);
    }
  if (ans > n) ans = n;
  if (n == 1)
    printf("1\n");
  else
    printf("%d\n", ans);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  solve();
  return 0;
}
