#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n), e(n), s(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  e[0] = 1;
  for (int i = 1; i < n; i++) {
    if (v[i - 1] < v[i])
      e[i] = 1 + e[i - 1];
    else
      e[i] = 1;
  }
  s[n - 1] = 1;
  for (int i = n - 2; i >= 0; i--) {
    if (v[i] < v[i + 1])
      s[i] = 1 + s[i + 1];
    else
      s[i] = 1;
  }
  int ans = -1;
  for (int i = 0; i < n; i++) ans = max(ans, s[i]);
  for (int i = 1; i < n - 1; i++) {
    if (v[i - 1] < v[i + 1]) {
      ans = max(ans, e[i - 1] + s[i + 1]);
    }
  }
  cout << ans;
  return 0;
}
