#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long mod = 1e9 + 7;
const int maxn = 2e5 + 5;
long long gcd(long long x, long long y) { return !y ? x : gcd(y, x % y); }
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
long long a[maxn];
int b[maxn], c[maxn];
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  int n;
  cin >> n;
  memset(b, 0, sizeof(b)), memset(c, 0, sizeof(c));
  for (int i = 1; i <= n; i++) cin >> a[i];
  b[1] = 1;
  int ans = 0;
  for (int i = 2; i <= n; i++) {
    b[i] = 1;
    if (a[i - 1] < a[i]) {
      b[i] += b[i - 1];
    }
    ans = max(ans, b[i]);
  }
  c[n] = 1;
  for (int i = n - 1; i >= 1; i--) {
    c[i] = 1;
    if (a[i] < a[i + 1]) {
      c[i] += c[i + 1];
    }
  }
  for (int i = 2; i < n; i++) {
    if (a[i - 1] < a[i + 1]) {
      ans = max(c[i + 1] + b[i - 1], ans);
    }
  }
  cout << ans << endl;
}
