#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 9;
int a[N];
vector<int> v[N];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int m = 0;
  v[m].push_back(a[1]);
  for (int i = 2; i <= n; i++) {
    if (a[i] > a[i - 1]) {
      v[m].push_back(a[i]);
    } else {
      v[++m].push_back(a[i]);
    }
  }
  int maxv = -1;
  for (int i = 0; i <= m; i++) {
    int q = v[i].size();
    maxv = max(q, maxv);
  }
  for (int i = 1; i <= m; i++) {
    int x = v[i - 1].size() - 1, y = v[i].size() - 1;
    if (v[i - 1][x] < v[i][1] || v[i - 1][x - 1] < v[i][0]) {
      maxv = max(x + y + 1, maxv);
    }
  }
  cout << maxv << endl;
}
