#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  vector<pair<int, int> > inc;
  for (int i = 0; i < n - 1; ++i) {
    int b = i;
    while (i < n - 1 && a[i + 1] > a[i]) ++i;
    if (b != i) inc.emplace_back(b, i);
  }
  int res = 1;
  for (auto i : inc) res = max(res, i.second - i.first + 1);
  for (int i = 0; i < inc.size() - 1 && !inc.empty(); ++i) {
    if (inc[i].second + 1 == inc[i + 1].first) {
      int d = inc[i].second;
      if ((d - 1 >= 0 && a[d - 1] < a[d + 1]) || (d + 2 < n && a[d] < a[d + 2]))
        res = max(res, inc[i + 1].second - inc[i].first);
    }
  }
  cout << res;
}
