#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int c, long long int d) {
  if (d == 0)
    return c;
  else
    return gcd(d, c % d);
}
int arr[100009], l[100009], r[100009];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &arr[i]);
  l[1] = 1;
  for (int i = 2; i <= n; i++) {
    l[i] = 1;
    if (arr[i - 1] < arr[i]) l[i] += l[i - 1];
  }
  r[n] = 1;
  for (int i = n - 1; i >= 1; i--) {
    r[i] = 1;
    if (arr[i + 1] > arr[i]) r[i] += r[i + 1];
  }
  int ans = 1;
  for (int i = 1; i <= n; i++) {
    ans = max(ans, max(l[i - 1] + 1, r[i + 1] + 1));
    if (arr[i + 1] - arr[i - 1] > 1) ans = max(ans, l[i - 1] + r[i + 1] + 1);
  }
  cout << ans << endl;
  return 0;
}
