#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int cases = 1;
  while (cases--) {
    long long int n;
    cin >> n;
    long long int a[n], b[n], c[n];
    for (long long int i = 0; i < n; i++) {
      cin >> a[i];
      b[i] = 1;
      c[i] = 1;
    }
    long long int ans = 1;
    for (long long int i = 1; i < n; i++) {
      if (a[i] > a[i - 1]) b[i] = b[i - 1] + 1;
      ans = max(ans, b[i]);
    }
    for (long long int i = n - 2; i >= 0; i--) {
      if (a[i] < a[i + 1]) c[i] = c[i + 1] + 1;
      ans = max(ans, c[i]);
    }
    for (long long int i = 0; i < n - 2; i++) {
      if (a[i] < a[i + 2]) ans = max(ans, b[i] + c[i + 2]);
    }
    cout << ans << "\n";
  }
  return 0;
}
