#include <bits/stdc++.h>
const int M = 1e9 + 3, N = 2 * 1e5 + 3;
using namespace std;
int main() {
  int n;
  cin >> n;
  long long a[n], k = 0;
  vector<long long> b(n, 1), c(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]) b[i] = b[i - 1] + 1;
  for (int i = n - 2; i >= 0; i--) {
    if (a[i] < a[i + 1]) c[i] = c[i + 1] + 1;
    k = max(k, c[i]);
  }
  for (int i = 0; i < n - 2; i++)
    if (a[i] < a[i + 2]) k = max(k, b[i] + c[i + 2]);
  cout << k;
  return 0;
}
