#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <typename T>
T pow(T a, T b, long long m) {
  T ans = 1;
  while (b > 0) {
    if (b % 2 == 1) ans = (ans * a) % m;
    b /= 2;
    a = (a * a) % m;
  }
  return ans % m;
}
const long long inf = 1e18;
const int32_t M = 1e9 + 7;
const int32_t MM = 998244353;
long long fact(long long n) { return (n == 1 || n == 0) ? 1 : n * fact(n - 1); }
long long max(long long x, long long y) { return (x > y) ? x : y; }
void error() {}
const long long N = 1e8 + 1;
void solve() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  vector<long long> l(n);
  vector<long long> r(n);
  vector<long long> ans(n);
  for (long long i = 0; i < (n); ++i) cin >> v[i];
  l[n - 1] = 1;
  long long maxd = 1;
  for (long long i = n - 2; i >= 0; i--) {
    if (v[i] < v[i + 1]) {
      l[i] = 1 + l[i + 1];
      maxd = max(l[i], maxd);
    } else {
      l[i] = 1;
    }
  }
  r[0] = 1;
  for (long long i = 1; i < (n); ++i) {
    if (v[i] > v[i - 1]) {
      r[i] = 1 + r[i - 1];
    } else {
      r[i] = 1;
    }
  }
  ans[0] = ans[n - 1] = -inf;
  for (long long i = 1; i < (n); ++i) {
    ans[0] = max(ans[0], l[i]);
  }
  for (long long i = 0; i < (n - 1); ++i) {
    ans[0] = max(ans[0], r[i]);
  }
  for (long long i = 1; i < (n - 1); ++i) {
    if (v[i - 1] < v[i + 1]) {
      ans[i] = r[i - 1] + l[i + 1];
    }
  }
  sort((ans).begin(), (ans).end());
  cout << max(ans[n - 1], maxd);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long q = 1;
  while (q--) solve();
  return 0;
}
