#include <bits/stdc++.h>
using namespace std;
int n;
int inc[200005];
int d[200005];
int a[300005];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  int maxx = 1;
  for (int i = n - 2; i >= 0; i--) {
    if (a[i] < a[i + 1]) {
      inc[i] = inc[i + 1] + 1;
      maxx = max(maxx, inc[i] + 1);
    } else {
      inc[i] = 0;
    }
  }
  for (int i = 1; i < n; i++) {
    if (a[i] > a[i - 1]) {
      d[i] = d[i - 1] + 1;
      maxx = max(maxx, d[i] + 1);
    } else {
      d[i] = 0;
    }
  }
  for (int i = 1; i < n - 1; i++) {
    if (a[i + 1] > a[i - 1]) {
      maxx = max(maxx, inc[i + 1] + 1 + d[i - 1] + 1);
    }
  }
  cout << maxx << endl;
  return 0;
}
