#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int a[maxn], b[maxn] = {1}, c[maxn] = {1};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i] -= i;
  }
  int ans = 1;
  fill(b, b + n, 1);
  fill(c, c + n, 1);
  for (int i = 1; i < n; i++)
    if (a[i] >= a[i - 1]) b[i] = b[i - 1] + 1, ans = max(ans, b[i]);
  for (int i = n - 2; i >= 0; i--)
    if (a[i] <= a[i + 1]) c[i] = c[i + 1] + 1, ans = max(ans, c[i]);
  for (int i = 0; i < n; i++) {
    if (i) ans = max(ans, b[i - 1] + 1);
    if (i < n - 1) ans = max(ans, c[i + 1] + 1);
    if (i && i < n - 1 && a[i - 1] <= a[i + 1])
      ans = max(ans, b[i - 1] + 1 + c[i + 1]);
  }
  cout << ans << endl;
}
