#include <bits/stdc++.h>
using namespace std;
void c_p_c() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long me(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int main() {
  c_p_c();
  long long n;
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) cin >> arr[i];
  long long dp[2][n + 1];
  dp[0][1] = 1;
  dp[1][1] = 0;
  long long max1 = 0;
  for (long long i = 2; i < n + 1; i++) {
    if (arr[i - 1] > arr[i - 2]) {
      dp[1][i] = dp[1][i - 1] + 1;
      dp[0][i] = dp[0][i - 1] + 1;
    } else if (arr[i - 1] <= arr[i - 2] && arr[i] > arr[i - 2] + 1) {
      max1 = max(max1, dp[1][i - 1]);
      dp[0][i] = 1;
      dp[1][i] = dp[0][i - 1] + 1;
    } else if ((arr[i - 1] <= arr[i - 2] && dp[0][i - 1] == 1 &&
                dp[1][i - 1] == 0) ||
               (arr[i - 1] <= arr[i - 2] && arr[i - 1] > arr[i - 3] + 1)) {
      max1 = max(max1, dp[1][i - 1]);
      dp[0][i] = 1;
      dp[1][i] = dp[0][i - 1] + 1;
    } else {
      max1 = max(max1, max(dp[0][i - 1] + 1, dp[1][i - 1]));
      dp[0][i] = 1;
      dp[1][i] = 2;
    }
  }
  cout << max(max1, max(dp[1][n], dp[0][n])) << endl;
  return 0;
}
