#include <bits/stdc++.h>
using namespace std;
const int sz = 1e5 + 10;
const int mod = 998244353;
long long int ar[sz], finish[sz], start[sz];
void solve() {
  long long int n, i, j, cnt = 0, prev = 0, ans = 0;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> ar[i];
  }
  if (n == 1 || n == 2) {
    cout << n << endl;
    return;
  }
  for (i = 1; i <= n; i++) {
    if (ar[i] > ar[i - 1])
      finish[i] += finish[i - 1] + 1;
    else
      finish[i] = 1;
    ans = max(ans, finish[i]);
  }
  for (i = n; i >= 1; i--) {
    if (ar[i] < ar[i + 1])
      start[i] += start[i + 1] + 1;
    else
      start[i] = 1;
  }
  for (i = 1; i <= n; i++) {
    if (ar[i + 1] - ar[i - 1] > 1) {
      ans = max(ans, 1 + finish[i - 1] + start[i + 1]);
    }
    ans = max(ans, 1 + finish[i - 1]);
    ans = max(ans, 1 + start[i + 1]);
  }
  cout << ans << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
