#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000000;
const int MOD = 1000000007;
const double pi = acos(-1.0);
const int N = 100009;
int a[N + 1], suf[N + 1], pr[N + 1];
int main() {
  int n;
  cin >> n;
  for (int i = (1); i <= (n); ++i) cin >> a[i];
  suf[n] = 1;
  for (int i = n - 1; i >= 1; --i) {
    if (a[i] < a[i + 1])
      suf[i] = suf[i + 1] + 1;
    else
      suf[i] = 1;
  }
  pr[1] = 1;
  for (int i = (2); i <= (n); ++i)
    if (a[i] > a[i - 1])
      pr[i] = pr[i - 1] + 1;
    else
      pr[i] = 1;
  int ans = 1;
  for (int i = (1); i <= (n); ++i) {
    ans = max(ans, 1 + max(suf[i + 1], pr[i - 1]));
    if (a[i - 1] + 2 <= a[i + 1]) ans = max(ans, pr[i - 1] + 1 + suf[i + 1]);
  }
  cout << ans << endl;
}
