#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 15;
int a[N], dp[N][2];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i += 1) {
    cin >> a[i];
  }
  int ans = 0;
  for (int i = n; i >= 1; i -= 1) {
    dp[i][0] = 1;
    if (i == n) continue;
    if (a[i] < a[i + 1]) dp[i][0] += dp[i + 1][0];
  }
  for (int i = 1; i <= n; i += 1) {
    dp[i][1] = 1;
    if (i == 1) continue;
    if (a[i] > a[i - 1]) {
      dp[i][1] += dp[i - 1][1];
    }
  }
  for (int i = 1; i <= n; i += 1) {
    int x = dp[i + 1][0];
    int y = dp[i - 1][1];
    ans = max(ans, min(n, x + 1));
    ans = max(ans, min(n, y + 1));
    if (a[i - 1] + 1 < a[i + 1]) ans = max(ans, min(n, x + y + 1));
  }
  if (n == 1) ans = 1;
  cout << min(ans, n) << '\n';
  return 0;
}
