#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m, i, j, p, q, ans = 0, cnt = 0;
  cin >> n;
  long long int a[n];
  for (i = 0; i < n; i++) cin >> a[i];
  long long int dec[n];
  long long int inc[n];
  dec[0] = 1;
  for (i = 1; i < n; i++) {
    if (a[i] > a[i - 1])
      dec[i] = dec[i - 1] + 1;
    else
      dec[i] = 1;
  }
  inc[n - 1] = 1;
  for (i = n - 2; i >= 0; i--) {
    if (a[i] < a[i + 1])
      inc[i] = inc[i + 1] + 1;
    else
      inc[i] = 1;
  }
  ans = max(inc[0], dec[n - 1]);
  for (i = 0; i < n; i++) {
    if (n != 1) {
      if (i == 0)
        ans = max(ans, inc[i + 1] + 1);
      else if (i == n - 1)
        ans = max(ans, dec[i - 1] + 1);
      else if (a[i + 1] - a[i - 1] >= 2)
        ans = max(ans, dec[i - 1] + inc[i + 1] + 1);
      else
        ans = max(ans, max(dec[i - 1], inc[i + 1]) + 1);
    }
  }
  if (n != 1) ans = max(ans, (long long int)2);
  cout << ans << endl;
  return 0;
}
