#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-7;
const int inf = 1000000010;
const int mod = 1000000007;
const int MAXN = 100010;
int n, a, b, x, y, w, ans = 1, v, p, q;
int A[MAXN];
int dp1[MAXN];
int dp2[MAXN];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> A[i];
    dp1[i] = 1;
    if (A[i] > A[i - 1]) dp1[i] += dp1[i - 1];
  }
  for (int i = n; i; i--) {
    dp2[i] = 1;
    if (A[i] < A[i + 1]) dp2[i] += dp2[i + 1];
  }
  for (int i = 1; i <= n; i++) {
    if (A[i - 1] + 1 < A[i + 1]) ans = max(ans, dp1[i - 1] + dp2[i + 1] + 1);
  }
  ans = max(ans, *max_element(dp1, dp1 + n + 1) + 1);
  ans = max(ans, *max_element(dp2, dp2 + n + 1) + 1);
  cout << min(ans, n) << endl;
  return 0;
}
