#include <bits/stdc++.h>
using namespace std;
const int mx = 1e5 + 10;
int lft[mx], rht[mx];
int d[mx];
int main() {
  int n;
  scanf("%d", &n);
  fill(d, d + mx, -2);
  for (int i = 1; i <= n; i++) scanf("%d", d + i);
  fill(lft, lft + mx, 0);
  fill(rht, rht + mx, 0);
  for (int i = 1; i <= n; i++) {
    lft[i] = 1;
    if (d[i] > d[i - 1]) lft[i] += lft[i - 1];
  }
  for (int i = n; i >= 1; i--) {
    rht[i] = 1;
    if (d[i] < d[i + 1]) rht[i] += rht[i + 1];
  }
  int ans = 1;
  for (int i = 1; i <= n; i++) {
    int better = 0;
    if (d[i - 1] + 1 < d[i + 1]) better = lft[i - 1] + rht[i + 1] + 1;
    better = max(better, 1 + lft[i - 1]);
    better = max(better, 1 + rht[i + 1]);
    ans = max(ans, better);
  }
  printf("%d", ans);
  return 0;
}
