#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int a[maxn], l[maxn], r[maxn];
int n, ans;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  l[1] = r[n] = 1;
  for (int i = 2; i <= n; i++) {
    if (a[i - 1] < a[i])
      l[i] = l[i - 1] + 1;
    else
      l[i] = 1;
  }
  for (int i = n - 1; i >= 1; i--) {
    if (a[i] < a[i + 1])
      r[i] = r[i + 1] + 1;
    else
      r[i] = 1;
  }
  for (int i = 1; i <= n; i++) {
    ans = max(ans, l[i - 1] + 1);
    ans = max(ans, 1 + r[i + 1]);
    if (a[i - 1] + 1 < a[i + 1]) ans = max(ans, l[i - 1] + 1 + r[i + 1]);
  }
  cout << ans << endl;
  return 0;
}
