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