#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> ending(n, 1);
  vector<long long> starting(n, 1);
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
  }
  long long count = 0;
  for (long long i = 0; i < n; i++) {
    if (i == 0)
      ending[i] = 1;
    else {
      if (v[i] > v[i - 1])
        ending[i] = ending[i - 1] + 1;
      else
        ending[i] = 1;
    }
    count = max(count, ending[i]);
  }
  for (long long i = n - 1; i >= 0; i--) {
    if (i == n - 1)
      starting[i] = 1;
    else {
      if (v[i] < v[i + 1])
        starting[i] = starting[i + 1] + 1;
      else
        starting[i] = 1;
    }
  }
  long long ans = count;
  for (long long i = 1; i < n - 1; i++) {
    if (v[i + 1] > v[i - 1]) {
      ans = max(ans, ending[i - 1] + starting[i + 1]);
    }
  }
  cout << ans << "\n";
}
