#include <bits/stdc++.h>
using namespace std;
int a[200005];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<pair<int, int> > v;
  int cur = 0, maxi = 0;
  for (int i = 0; i < n; i++) {
    if (i == 0 || a[i] > a[i - 1])
      cur++;
    else {
      maxi = max(cur, maxi);
      v.push_back(make_pair(cur, i - 1));
      cur = 1;
    }
  }
  maxi = max(cur, maxi);
  v.push_back(make_pair(cur, n - 1));
  for (int i = 1; i < v.size(); i++) {
    int li = v[i - 1].second;
    int fi = v[i].second - v[i].first + 1;
    if (v[i - 1].first >= 2 && fi == li + 1 && a[li - 1] < a[fi])
      maxi = max(maxi, v[i - 1].first + v[i].first - 1);
    else if (v[i].first >= 2 && fi == li + 1 && a[li] < a[fi + 1])
      maxi = max(maxi, v[i - 1].first + v[i].first - 1);
  }
  cout << maxi << endl;
  return 0;
}
