#include <bits/stdc++.h>
using namespace std;
long long n, r, pos, a[100005], b[100005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] > a[i - 1])
      b[i] = b[i - 1] + 1;
    else
      b[i] = 1;
  }
  for (long long i = n; i > 0; i--) {
    r = max(r, b[i - 1] + 1);
    r = max(r, pos + 1);
    if (i == 1 || i == n || a[i - 1] + 1 < a[i + 1])
      r = max(r, b[i - 1] + pos + 1);
    if (a[i] < a[i + 1])
      pos++;
    else
      pos = 1;
  }
  cout << r << endl;
}
