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