#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n;
  cin >> n;
  long long a[n + 1];
  for (int i = 0; i < n; i++) cin >> a[i];
  ;
  a[n] = LLONG_MIN;
  long long cnt = 0;
  vector<pair<long long, long long> > v;
  for (int i = 0; i < n; i++) {
    if (a[i] < a[i + 1]) {
      cnt++;
    } else {
      v.push_back({i - cnt, i});
      cnt = 0;
    }
  }
  sort(v.begin(), v.end());
  long long ans = 1;
  if (v.size() == 0) {
    cout << 1 << '\n';
    return 0;
  }
  if (v.size() == 1) {
    cout << max(1LL, v[0].second - v[0].first + 1) << '\n';
    return 0;
  }
  for (int i = 0; i < v.size(); i++) {
    ans = max(ans, v[i].second - v[i].first + 1);
  }
  for (int i = 0; i < v.size() - 1; i++) {
    if (v[i].second + 1 == v[i + 1].first) {
      if (a[v[i].second] >= a[v[i + 1].first]) {
        if (v[i].first <= v[i].second - 1 &&
            a[v[i].second - 1] < a[v[i + 1].first])
          ans = max(ans, v[i + 1].second - v[i + 1].first + 1 + v[i].second -
                             v[i].first);
        else if (v[i + 1].first + 1 <= v[i + 1].second &&
                 a[v[i + 1].first + 1] > a[v[i].second])
          ans = max(ans, v[i + 1].second - v[i + 1].first + 1 + v[i].second -
                             v[i].first);
      }
    }
  }
  cout << ans << '\n';
  return 0;
}
