#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, m = 0, l;
  cin >> n;
  vector<int> v(n);
  vector<int> ch(n, 0);
  for (i = 0; i < n; i++) cin >> v[i];
  l = 1;
  ch[0] = 1;
  for (i = 1; i < n; i++) {
    if (v[i] > v[i - 1])
      l++;
    else {
      m = max(l, m);
      l = 1;
      ch[i] = 1;
      ch[i - 1] = 1;
    }
  }
  m = max(l, m);
  ch[i] = 1;
  for (i = 1; i < n - 1; i++) {
    if (ch[i] == 0) continue;
    j = i;
    j--;
    l = 1;
    if (v[j] < v[j + 2]) {
      l++;
      j--;
      while (j >= 0 && v[j] < v[j + 1]) {
        l++;
        j--;
      }
    }
    j = i + 2;
    while (j < n && v[j] > v[j - 1]) {
      l++;
      j++;
    }
    m = max(l, m);
  }
  cout << m << endl;
}
