#include <bits/stdc++.h>
using namespace std;
void fast() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  fast();
  long long t;
  cin >> t;
  long long a[100069], cnt = 1, ans = 0, left[100069] = {0},
                       right[100069] = {0};
  left[0] = 1;
  for (long long i = 0; i < t; i++) {
    cin >> a[i];
    if (i != 0)
      if (a[i] > a[i - 1])
        left[i] = left[i - 1] + 1;
      else
        left[i] = 1;
  }
  if (t <= 2) {
    cout << t << endl;
    return 0;
  }
  right[t - 1] = 1;
  for (long long i = t - 1; i >= 1; i--) {
    if (a[i] > a[i - 1])
      right[i - 1] = right[i] + 1;
    else
      right[i - 1] = 1;
  }
  for (long long i = 0; i < t; i++) {
    if (a[i + 1] - a[i - 1] > 1) {
      ans = max(ans, right[i + 1] + left[i - 1]);
    } else
      ans = max(ans, max(right[i + 1], left[i - 1]));
  }
  cout << ans + 1 << "\n";
  return 0;
}
