#include <bits/stdc++.h>
using namespace std;
int n, x[100005], y[100005], z[100005], ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", x + i);
  x[0] = INT_MIN;
  x[n + 1] = INT_MAX;
  for (int i = 1; i <= n; i++) y[i] = x[i - 1] < x[i] ? y[i - 1] + 1 : 1;
  for (int i = n; i; i--) z[i] = x[i] < x[i + 1] ? z[i + 1] + 1 : 1;
  for (int i = 1; i <= n; i++)
    if (x[i - 1] + 1 < x[i + 1])
      ans = max(ans, y[i - 1] + z[i + 1] + 1);
    else
      ans = max(ans, max(y[i - 1], z[i + 1]) + 1);
  printf("%d\n", ans);
  return 0;
}
