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