#include <bits/stdc++.h>
using namespace std;
const long long N = 2 * 100 * 1000 + 19;
const long long inf = 1000 * 1000 * 1000 + 19;
const long long mod = 1000000007;
long long n, a[N], dp2[2][N], dp[N];
int32_t main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  dp2[0][1] = 1;
  for (long long i = 2; i <= n; i++) {
    if (a[i] > a[i - 1])
      dp2[0][i] = dp2[0][i - 1] + 1;
    else
      dp2[0][i] = 1;
  }
  dp2[1][n] = 1;
  for (long long i = n - 1; i > 0; i--) {
    if (a[i + 1] > a[i])
      dp2[1][i] = dp2[1][i + 1] + 1;
    else
      dp2[1][i] = 1;
  }
  for (long long i = 1; i < n; i++) {
    if (a[i + 1] - a[i - 1] >= 2)
      dp[i] = dp2[0][i - 1] + dp2[1][i + 1] + 1;
    else
      dp[i] = max(dp2[0][i - 1], dp2[1][i + 1]) + 1;
  }
  dp[n] = dp2[0][n - 1] + 1;
  sort(dp + 1, dp + n + 1);
  cout << dp[n];
  return 0;
}
