#include <bits/stdc++.h>
using namespace std;
long long a[123456], st[123456], en[123456];
int main() {
  long long n, i;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  en[1] = 1;
  for (i = 2; i <= n; i++) {
    if (a[i] > a[i - 1])
      en[i] = 1 + en[i - 1];
    else
      en[i] = 1;
  }
  st[n] = 1;
  for (i = n - 1; i >= 1; i--) {
    if (a[i] < a[i + 1])
      st[i] = 1 + st[i + 1];
    else
      st[i] = 1;
  }
  long long ans = 0;
  for (i = 1; i <= n; i++) ans = max(ans, max(st[i], en[i]));
  for (i = 2; i <= n - 1; i++) {
    if ((a[i + 1] - a[i - 1]) >= 2) ans = max(ans, en[i - 1] + st[i + 1] + 1);
    ans = max(ans, 1 + en[i - 1]);
    ans = max(ans, 1 + st[i + 1]);
  }
  ans = max(ans, 1 + st[2]);
  ans = max(ans, 1 + en[n - 1]);
  cout << ans;
}
