#include <bits/stdc++.h>
using namespace std;
const long long N = 100005;
long long dx[] = {1, 1, 0, -1, -1, -1, 0, 1};
long long dy[] = {0, 1, 1, 1, 0, -1, -1, -1};
long long gcd(long long x, long long y) {
  if (y == 0)
    return x;
  else
    return gcd(y, x % y);
}
long long expo(long long n, long long m, long long p) {
  long long r = 1;
  n = n % p;
  while (m > 0) {
    if (m % 2) r = (r * n) % p;
    n = (n * n) % p;
    m = m / 2;
  }
  return r % p;
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  vector<long long> a(n + 1);
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  vector<long long> r(n + 2), l(n + 2);
  r[n] = l[1] = 1;
  for (long long i = 2; i <= n; i++) {
    if (a[i] > a[i - 1])
      l[i] = l[i - 1] + 1;
    else
      l[i] = 1;
  }
  for (long long i = n - 1; i > 0; i--) {
    if (a[i] < a[i + 1]) {
      r[i] = r[i + 1] + 1;
    } else {
      r[i] = 1;
    }
  }
  long long ans = 1;
  for (long long i = 1; i <= n; i++) {
    if (a[i + 1] - a[i - 1] >= 2) {
      ans = max(ans, l[i - 1] + 1 + r[i + 1]);
    } else {
      ans = max(ans, max(l[i - 1], r[i + 1]) + 1);
    }
  }
  cout << ans << '\n';
}
