#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
vector<int> wz;
int a[N];
int dp1[N];
int dp2[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  if (n == 1) {
    printf("1");
    return 0;
  }
  a[0] = 0;
  a[n + 1] = 1e9 + 7;
  for (int i = 1; i <= n; i++) {
    if (a[i + 1] - a[i - 1] >= 2 && (a[i] <= a[i - 1] || a[i] >= a[i + 1])) {
      wz.push_back(i);
    }
  }
  dp1[0] = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] > a[i - 1])
      dp1[i] = dp1[i - 1] + 1;
    else
      dp1[i] = 1;
  }
  dp1[n + 1] = dp1[n];
  dp2[n + 1] = 0;
  for (int i = n; i >= 1; i--) {
    if (a[i + 1] > a[i])
      dp2[i] = dp2[i + 1] + 1;
    else
      dp2[i] = 1;
  }
  dp2[0] = dp2[1];
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    if (sum < dp1[i]) {
      sum = dp1[i];
    }
  }
  int ans = sum + 1;
  for (int i = 0; i < wz.size(); i++) {
    ans = max(ans, dp1[wz[i] - 1] + dp2[wz[i] + 1] + 1);
  }
  if (ans > n) ans = n;
  cout << ans << endl;
  return 0;
}
