#include <bits/stdc++.h>
using namespace std;
const double PI = acos(0.0) * 2.0;
int len, ipt[100005], toRt[100005], toLf[100005], ans;
int main() {
  scanf("%d", &len);
  for (int i = 0; i < len; i++) scanf("%d", &ipt[i]);
  if (len == 1)
    ans = 1;
  else if (len == 2)
    ans = 2;
  else {
    toRt[0] = toLf[len - 1] = 1;
    for (int i = 1; i < len; i++)
      toRt[i] = (ipt[i - 1] < ipt[i]) ? toRt[i - 1] + 1 : 1;
    for (int i = len - 2; i >= 0; i--)
      toLf[i] = (ipt[i] < ipt[i + 1]) ? toLf[i + 1] + 1 : 1;
    ans = max(toRt[len - 2] + 1, toLf[1] + 1);
    for (int i = 1; i < len - 1; i++) {
      ans = max(ans, toRt[i] + 1);
      ans = max(ans, toLf[i] + 1);
      if (ipt[i - 1] + 1 < ipt[i + 1])
        ans = max(ans, toRt[i - 1] + toLf[i + 1] + 1);
    }
  }
  printf("%d\n", ans);
  return 0;
}
