#include <bits/stdc++.h>
using namespace std;
int a[100005], pre[100005], suf[100005], n;
void solve() {
  for (int i = 1; i <= n; ++i) {
    if (a[i] > a[i - 1])
      pre[i] = pre[i - 1] + 1;
    else
      pre[i] = 1;
  }
  suf[n] = 1;
  for (int i = n - 1; i >= 0; --i) {
    if (a[i] < a[i + 1])
      suf[i] = suf[i + 1] + 1;
    else
      suf[i] = 1;
  }
  int ans = INT_MIN;
  for (int i = 1; i <= n; ++i) {
    if (a[i + 1] - a[i - 1] >= 2)
      ans = max(ans, pre[i - 1] + suf[i + 1] + 1);
    else
      ans = max(ans, max(pre[i - 1], suf[i + 1]) + 1);
  }
  cout << ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  solve();
  return 0;
}
