#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t, test;
  t = 1;
  for (test = 1; test <= t; test++) {
    long long i, j, n, m, k, q, sum, maxm = 1, minm, counter, flag;
    long long answer = -1;
    cin >> n;
    long long a[n];
    for (i = 0; i < n; i++) {
      cin >> a[i];
    }
    long long pref[n], suff[n];
    pref[0] = 1;
    for (i = 1; i < n; i++) {
      if (a[i] > a[i - 1]) {
        pref[i] = pref[i - 1] + 1;
      } else {
        pref[i] = 1;
      }
      maxm = max(maxm, pref[i]);
    }
    suff[n - 1] = 1;
    for (i = n - 2; i >= 0; i--) {
      if (a[i] < a[i + 1]) {
        suff[i] = suff[i + 1] + 1;
      } else {
        suff[i] = 1;
      }
    }
    for (i = 1; i < n - 1; i++) {
      if (a[i + 1] > a[i - 1]) {
        answer = max(answer, pref[i - 1] + suff[i + 1]);
      }
    }
    if (n >= 2) {
      answer = max(answer, max(suff[1], suff[n - 2]));
    }
    answer = max(answer, maxm);
    cout << answer << '\n';
  }
  return 0;
}
