#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
const double pi = 3.1415926535897932384626433832795028841971;
const double EPS = 1E-9;
const signed long long INF64 = (signed long long)1E18;
const int INF = 1000000000;
static inline bool get(int &v) {
  int s = 1, c;
  while (!isdigit(c = getchar()) && c != '-') {
    if (c == EOF) break;
  }
  if (c == EOF) return 0;
  if (c == '-')
    s = 0, v = 0;
  else
    v = c ^ 48;
  for (; isdigit(c = getchar()); v = (v << 1) + (v << 3) + (c ^ 48))
    ;
  v = (s ? v : -v);
  return 1;
}
const int maxn = 100005;
int e[maxn];
int up[maxn], down[maxn];
void run() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> e[i];
  }
  up[0] = 1;
  for (int i = 1; i < n; i++) {
    if (e[i] > e[i - 1])
      up[i] = up[i - 1] + 1;
    else
      up[i] = 1;
  }
  down[n - 1] = 1;
  for (int i = n - 2; i >= 0; i--) {
    if (e[i] < e[i + 1])
      down[i] = down[i + 1] + 1;
    else
      down[i] = 1;
  }
  int ans = 1;
  if (n > 1) {
    ans = max(up[n - 2] + 1, ans);
    ans = max(down[1] + 1, ans);
  }
  for (int i = 1; i < n - 1; i++) {
    ans = max(ans, down[i + 1] + 1);
    ans = max(ans, up[i - 1] + 1);
    if (e[i - 1] + 1 < e[i + 1]) {
      ans = max(ans, up[i - 1] + down[i + 1] + 1);
    }
  }
  cout << ans << endl;
}
int main() {
  run();
  return 0;
}
