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