#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<pair<int, int> > v;
  int st = 0;
  for (int i = 1; i < n; i++) {
    while (i < n && a[i] > a[i - 1]) i++;
    v.push_back(make_pair(st, i - 1));
    st = i;
  }
  if (st != n) v.push_back(make_pair(st, n - 1));
  int ans = 0;
  for (int i = 0; i < v.size(); i++) {
    ans = max(ans, v[i].second - v[i].first + 1);
  }
  for (int i = 1; i < v.size(); i++) {
    int s1 = v[i].second - v[i].first + 1;
    int s2 = v[i - 1].second - v[i - 1].first + 1;
    if (s1 == 1 || s2 == 1)
      ans = max(ans, s1 + s2);
    else {
      int p1 = a[v[i - 1].second - 1];
      int p2 = a[v[i].first + 1];
      if (p2 > a[v[i - 1].second] + 1) ans = max(ans, s1 + s2);
      if (a[v[i].first] > p1 + 1) ans = max(ans, s1 + s2);
      ans = max(ans, s1 + 1);
      ans = max(ans, s2 + 1);
    }
  }
  cout << ans << endl;
}
