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