#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, i, ans = 0;
  cin >> n;
  long int a[n];
  int check[n], left[n], right[n], tick = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (i == 0)
      check[i] = 0;
    else if (a[i] > a[i - 1])
      check[i] = 1;
    else
      check[i] = 0;
  }
  if (n == 1) {
    cout << "1";
    return 0;
  }
  left[0] = 0;
  tick = 0;
  for (i = 1; i < n; i++) {
    left[i] = tick;
    if (check[i])
      tick++;
    else
      tick = 0;
  }
  right[n - 1] = 0;
  if (check[n - 1])
    tick = 1;
  else
    tick = 0;
  for (i = n - 2; i >= 0; i--) {
    right[i] = tick;
    if (check[i])
      tick++;
    else
      tick = 0;
  }
  for (i = 0; i < n; i++) {
    if (i > 0 && i < n - 1) {
      if (a[i + 1] - a[i - 1] > 1) {
        if (check[i - 1])
          ans = max(ans, left[i - 1] + right[i + 1] + 4);
        else
          ans = max(ans, right[i + 1] + 3);
      }
      if (check[i - 1])
        ans = max(left[i - 1] + 3, ans);
      else
        ans = max(ans, 2);
      ans = max(ans, right[i + 1] + 2);
    } else if (i == 0) {
      ans = max(ans, right[i + 1] + 2);
    } else if (i == n - 1) {
      if (check[i - 1])
        ans = max(left[i - 1] + 3, ans);
      else
        ans = max(ans, 2);
    }
  }
  cout << ans << endl;
  return 0;
}
