#include <bits/stdc++.h>
using namespace std;
const long long cnst = 1e15 + 7, di = 998244353, N = 1e6;
bool IsQuery = false, found = false;
long long int q = 1, k, a[N], b[N];
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
string s, t;
void solve() {
  long long n, m, k, sum = 0, minm = cnst, ans = 0, val;
  cin >> n;
  vector<long long int> v(n, 1), r(n, 1);
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 1; i < n; i++) {
    if (a[i] > a[i - 1]) v[i] += v[i - 1];
  }
  ans = *max_element(v.begin(), v.end());
  for (int i = n - 2; i >= 0; i--) {
    if (a[i] < a[i + 1]) r[i] += r[i + 1];
  }
  for (int i = 1; i < n - 1; i++) {
    if (a[i + 1] > a[i - 1]) {
      val = v[i - 1] + r[i + 1];
      ans = max(ans, val);
    }
  }
  cout << ans;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  if (IsQuery) cin >> q;
  for (int i = 0; i < q; i++) {
    solve();
    cout << "\n";
  }
  return 0;
}
