#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1000 * 100 + 10;
long long n, dp[maxn], a[maxn], maxi = 0;
vector<pair<long long, long long> > v;
bool mark2[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  a[n + 1] = -1;
  for (int i = 1; i <= n + 1; i++)
    for (int j = i + 1; j <= n + 1; j++)
      if (a[j] <= a[j - 1]) {
        v.push_back(make_pair(i, j - 1));
        i = j - 1;
        break;
      }
  for (int i = 0; i < v.size(); i++) {
    long long an = v[i].second - v[i].first + 1;
    if (!(v[i].first == 1 && v[i].second == n)) an++;
    maxi = max(maxi, an);
  }
  for (int i = 0; i < v.size() - 1; i++)
    if (a[v[i].second] + 1 < a[v[i + 1].first + 1] ||
        a[v[i].second - 1] + 1 < a[v[i + 1].first])
      maxi = max(maxi, v[i + 1].second - v[i].first + 1);
  cout << maxi;
  return 0;
}
