#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int a[maxn], d[maxn], size = 0, n;
int first[maxn], last[maxn];
vector<int> v[maxn];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i < n; i++) {
    if (a[i] < a[i + 1]) {
      v[size].push_back(a[i]);
    } else {
      v[size].push_back(a[i]);
      size++;
    }
  }
  v[size].push_back(a[n]);
  int ans = v[0].size();
  if (size)
    for (int i = 0; i <= size; i++) ans = max(ans, (int)v[i].size() + 1);
  for (int i = 0; i < size; i++) {
    int res = 0;
    res = v[i].size();
    if (v[i + 1].size() == 1) {
      res++;
      if (i + 2 <= size) {
        if (v[i + 2].front() > v[i].back() + 1) res += v[i + 2].size();
      }
    } else if (v[i + 1][1] > v[i].back() + 1)
      res += v[i + 1].size();
    else if (v[i][v[i].size() - 2] + 1 < v[i + 1].front())
      res += v[i + 1].size();
    ans = max(ans, res);
  }
  cout << ans << endl;
  return 0;
}
