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