#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v;
  v.resize(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  vector<int> l, r;
  l.resize(n, 1);
  r.resize(n, 1);
  for (int i = n - 2; i >= 0; i--)
    if (v[i] < v[i + 1]) l[i] += l[i + 1];
  for (int i = 1; i < n; i++)
    if (v[i] > v[i - 1]) r[i] += r[i - 1];
  int ans = *max_element(r.begin(), r.end());
  for (int i = 1; i < n - 1; i++)
    ans = (v[i + 1] > v[i - 1]) ? max(ans, r[i - 1] + l[i + 1]) : ans;
  cout << ans << endl;
}
