#include <bits/stdc++.h>
using namespace std;
int L[100010], R[100010], A[100010];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> A[i];
  L[0] = 1;
  for (int i = 1; i < n; ++i)
    if (A[i] > A[i - 1])
      L[i] = L[i - 1] + 1;
    else
      L[i] = 1;
  R[n - 1] = 1;
  for (int i = n - 2; i >= 0; --i)
    if (A[i + 1] > A[i])
      R[i] = R[i + 1] + 1;
    else
      R[i] = 1;
  int ans = 0;
  for (int i = 0; i < n; ++i) {
    ans = max(ans, max(L[i], R[i]));
    if (i - 1 >= 0) ans = max(ans, 1 + L[i - 1]);
    if (i + 1 < n) ans = max(ans, 1 + R[i + 1]);
    if (i - 1 >= 0 && i + 1 < n && 1 + A[i - 1] < A[i + 1])
      ans = max(ans, 1 + L[i - 1] + R[i + 1]);
  }
  cout << ans;
  return 0;
}
