#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  vector<int> l(n, 1);
  l[0] = 1;
  vector<int> r(n, 1);
  r[n - 1] = 1;
  for (int &i : v) cin >> i;
  for (int i = 1; i < n; ++i)
    if (v[i - 1] < v[i]) {
      l[i] = 1 + l[i - 1];
    }
  for (int i = n - 2; i >= 0; --i) {
    if (v[i] < v[i + 1]) {
      r[i] = 1 + r[i + 1];
    }
  }
  int ans =
      max(*max_element(l.begin(), l.end()), *max_element(r.begin(), r.end()));
  for (int i = 1; i < n - 1; ++i) {
    if (v[i - 1] < v[i + 1]) {
      ans = max(ans, l[i - 1] + r[i + 1]);
    }
  }
  cout << ans << '\n';
}
