#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);
}
long long exp(long long x, long long n, long long mod) {
  long long result = 1;
  while (n) {
    if (n & 1) result = (result * x) % mod;
    x = (x * x) % mod;
    n = n >> 1;
  }
  return result;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int k = 1;
  vector<int> r(n, 1), l(n, 1);
  for (int i = n - 2; i >= 0; i--) {
    if (a[i] < a[i + 1]) r[i] = r[i + 1] + 1;
    k = max(k, r[i]);
  }
  for (int i = 1; i < n; i++) {
    if (a[i] > a[i - 1]) l[i] = l[i - 1] + 1;
    k = max(k, l[i]);
  }
  for (int i = 1; i < n - 1; i++) {
    if (a[i - 1] < a[i + 1]) k = max(k, l[i - 1] + r[i + 1]);
  }
  cout << k << "\n";
  return 0;
}
