#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using pi = pair<int, int>;
int n;
void solve() {
  cin >> n;
  vi a(n), l(n), r(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  r[n - 1] = 1;
  for (int i = n - 2; i >= 0; --i) r[i] = a[i] < a[i + 1] ? r[i + 1] + 1 : 1;
  l[0] = 1;
  int res = 0;
  for (int i = 1; i < n; ++i) {
    l[i] = a[i] > a[i - 1] ? l[i - 1] + 1 : 1;
    res = max(res, l[i]);
  }
  for (int i = 1; i < n - 1; ++i) {
    if (a[i - 1] < a[i + 1]) res = max(res, l[i - 1] + r[i + 1]);
  }
  cout << res << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  t = 1;
  while (t--) solve();
}
