#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const int mod = 1e9 + 7;
const int maxn = 2e5 + 10;
int n;
int a[maxn];
int l[maxn], r[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] > a[i - 1])
      l[i] = l[i - 1] + 1;
    else
      l[i] = 1;
    ans = max(ans, l[i]);
  }
  r[n] = 1;
  for (int i = n - 1; i >= 1; i--) {
    if (a[i] < a[i + 1])
      r[i] = r[i + 1] + 1;
    else
      r[i] = 1;
  }
  for (int i = 2; i < n; i++) {
    if (a[i + 1] > a[i - 1]) ans = max(ans, l[i - 1] + r[i + 1]);
  }
  cout << ans << endl;
  return 0;
}
