#include <bits/stdc++.h>
using namespace std;
int lenOfLongIncSubArr(int a[], int n) {
  int max = 1, len = 1;
  for (int i = 1; i < n; i++) {
    if (a[i] > a[i - 1])
      len++;
    else {
      if (max < len) max = len;
      len = 1;
    }
  }
  if (max < len) max = len;
  return max;
}
int seg(int a[], int n) {
  int l[n], r[n + 1], ans = 0;
  l[0] = 1;
  for (int i = 1; i < n; i++) {
    if (a[i] > a[i - 1]) {
      l[i] = l[i - 1] + 1;
      ans = max(ans, l[i]);
    } else
      l[i] = 1;
  }
  if (ans != n) ++ans;
  r[n] = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (a[i] < a[i + 1])
      r[i] = r[i + 1] + 1;
    else
      r[i] = 1;
  }
  for (int i = n - 1; i > 0; i--) {
    if (a[i + 1] - a[i - 1] > 0) ans = max(ans, l[i - 1] + r[i + 1] + 1);
  }
  return max(ans, r[0]);
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int q = seg(a, n);
  int p = lenOfLongIncSubArr(a, n);
  if (p == q) {
    cout << p;
  } else {
    cout << q - 1;
  }
  return 0;
}
