#include <bits/stdc++.h>
using namespace std;
ifstream fin("AAtest.in.txt");
long long n, jad[200005], t[200005], m;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cerr.tie(0);
  cin >> n;
  t[0] = 1;
  for (int(i) = (0); ((i)) < ((n)); ((i))++) {
    cin >> jad[i];
    if (i) {
      if (jad[i] > jad[i - 1]) {
        t[i] = t[i - 1] + 1;
      } else {
        t[i] = 1;
      }
    }
  }
  int k = n - 1;
  long long vas = 0;
  while (k >= 0) {
    long long p = t[k];
    vas = max(vas, p);
    for (int i = k - p + 1; i <= k; i++) t[i] = p;
    k -= p;
  }
  for (int(i) = (0); ((i)) < ((n)); ((i))++)
    if (i and i < n - 1) {
      if ((jad[i] >= jad[i + 1] and jad[i - 1] < jad[i + 1]))
        vas = max(vas, t[i - 1] + t[i + 1] - 1);
      if (jad[i] <= jad[i - 1] and jad[i - 1] < jad[i + 1])
        vas = max(vas, t[i - 1] + t[i + 1] - 1);
    }
  cout << vas;
}
