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