#include <bits/stdc++.h>
using namespace std;
struct my {
  long szPrev, prev, next, szNext;
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long n;
  long sz = 1;
  long ans = 0;
  vector<long> vecIn;
  vector<my> vecTemp;
  cin >> n;
  vecIn.resize(n);
  for (long i = 0; i < n; i++) cin >> vecIn[i];
  for (long i = 1; i < n; i++) {
    if (vecIn[i] <= vecIn[i - 1]) {
      if (vecTemp.size() > 0) vecTemp[vecTemp.size() - 1].szNext = sz;
      vecTemp.push_back({sz, i - 1, i, 0});
      sz = 1;
    } else
      sz++;
  }
  if (vecTemp.size() > 0)
    vecTemp[vecTemp.size() - 1].szNext = sz;
  else {
    cout << n;
    return 0;
  }
  for (long i = 0; i < vecTemp.size(); i++) {
    long p = vecTemp[i].prev;
    long n = vecTemp[i].next;
    long szP = vecTemp[i].szPrev;
    long szN = vecTemp[i].szNext;
    if (vecIn[p - 1] < vecIn[p + 1]) ans = max(ans, szP + szN - 1);
    if (vecIn[n - 1] < vecIn[n + 1]) ans = max(ans, szP + szN - 1);
    ans = max(ans, szP);
    ans = max(ans, szN);
  }
  cout << ans;
  return 0;
}
