#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long cc = 1;
  long long b1[n], b2[n];
  for (long long i = 0; i < n; i++) {
    b1[i] = 1;
    b2[i] = 1;
    if (i != 0 && a[i] > a[i - 1]) b1[i] = b1[i - 1] + 1;
    cc = max(cc, b1[i]);
  }
  for (long long i = n - 2; i >= 0; i--) {
    if (a[i] < a[i + 1]) b2[i] = b2[i + 1] + 1;
  }
  long long k = 1;
  while (k < n - 1) {
    if (a[k + 1] > a[k - 1]) cc = max(cc, b1[k - 1] + b2[k + 1]);
    k++;
  }
  cout << cc << '\n';
}
