#include <bits/stdc++.h>
using namespace std;
int num[111111], dp[111111], dpp[111111];
int main() {
  memset(dp, 0, sizeof(dp));
  memset(dpp, 0, sizeof(dpp));
  int n, i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &num[i]);
  dp[1] = 1;
  for (i = 2; i <= n; i++) {
    if (num[i] > num[i - 1])
      dp[i] = dp[i - 1] + 1;
    else
      dp[i] = 1;
  }
  dpp[n] = 1;
  for (i = n - 1; i >= 1; i--) {
    if (num[i] < num[i + 1])
      dpp[i] = dpp[i + 1] + 1;
    else
      dpp[i] = 1;
  }
  int maxnum = 1;
  for (i = 1; i <= n; i++) {
    if (i == 1) {
      if (num[1] < num[2])
        maxnum = max(maxnum, dpp[1]);
      else
        maxnum = max(maxnum, dpp[2] + 1);
    } else if (i == n) {
      if (num[n] > num[n - 1])
        maxnum = max(maxnum, dp[n]);
      else
        maxnum = max(maxnum, dp[n - 1] + 1);
    } else {
      if (num[i] > num[i - 1] && num[i] < num[i + 1])
        maxnum = max(dp[i] + dpp[i + 1], maxnum);
      else if (num[i + 1] - num[i - 1] >= 2)
        maxnum = max(dp[i - 1] + dpp[i + 1] + 1, maxnum);
      else {
        maxnum = max(maxnum, max(dp[i - 1] + 1, dpp[i + 1] + 1));
      }
    }
  }
  printf("%d\n", maxnum);
  return 0;
}
