#include <bits/stdc++.h>
using namespace std;
long long n, arr[100005], sum1[100005], sum2[100005], res;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  sum1[0] = 1;
  for (int i = 1; i < n; i++) {
    if (arr[i] > arr[i - 1])
      sum1[i] = sum1[i - 1] + 1;
    else
      sum1[i] = 1;
  }
  for (int i = n - 1; i >= 0; i--) {
    if (arr[i] < arr[i + 1])
      sum2[i] = sum2[i + 1] + 1;
    else
      sum2[i] = 1;
  }
  for (int i = 0; i < n; i++) {
    long long a = 0;
    if (i) a = sum1[i - 1];
    long long b = sum2[i + 1];
    res = max(res, max(a + 1, b + 1));
    if (i && arr[i + 1] - arr[i - 1] >= 2)
      res = max(res, sum1[i - 1] + sum2[i + 1] + 1);
  }
  cout << res;
}
