#include <bits/stdc++.h>
using namespace std;
int nod12(int a, int b) {
  while (a != 0 && b != 0) {
    b = b % a;
    swap(a, b);
  }
  return a + b;
}
int arr[3];
int main() {
  int n, t, tmp;
  cin >> n;
  vector<int> a(n), b(n), c(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  b[0] = 1;
  for (int i = 1; i < n; i++) {
    if (a[i - 1] < a[i])
      b[i] = b[i - 1] + 1;
    else
      b[i] = 1;
  }
  c[n - 1] = 1;
  for (int i = n - 2; i >= 0; i--) {
    if (a[i] < a[i + 1])
      c[i] = c[i + 1] + 1;
    else
      c[i] = 1;
  }
  int maxAns = 0;
  for (int i = 0; i < n; i++) {
    if (i == 0)
      maxAns = max(max(c[i + 1], c[i]), maxAns);
    else if (i == n - 1)
      maxAns = max(max(b[i - 1], b[i]), maxAns);
    else {
      if (a[i - 1] < a[i + 1])
        maxAns = max(b[i - 1] + c[i + 1], maxAns);
      else
        maxAns = max(max(b[i - 1], c[i + 1]), maxAns);
    }
  }
  cout << maxAns << endl;
  return 0;
}
