#include <bits/stdc++.h>
using namespace std;
long long n;
long long func(long long arr[]) {
  long long left[n + 2], right[n + 2];
  long long max1 = 0;
  left[n + 1] = left[0] = 0;
  right[0] = right[n + 1] = 0;
  for (long long i = 1; i < n + 1; i++) {
    if (arr[i] > arr[i - 1])
      left[i] = left[i - 1] + 1;
    else
      left[i] = 1;
  }
  for (long long i = n; i >= 1; i--) {
    if (arr[i] < arr[i + 1])
      right[i] = right[i + 1] + 1;
    else
      right[i] = 1;
  }
  for (long long i = 1; i < n + 1; i++) {
    if (arr[i + 1] - arr[i - 1] > 1)
      max1 = max(max1, left[i - 1] + right[i + 1] + 1);
    else
      max1 = max(max1, max(left[i - 1], right[i + 1]) + 1);
  }
  return max1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cin >> n;
  long long arr[n + 2];
  for (long long i = 1; i < n + 1; i++) cin >> arr[i];
  arr[0] = 100000000;
  arr[n + 1] = 100000000;
  if (n < 3)
    cout << n;
  else
    cout << func(arr);
}
