#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
int n, a[maxn], pre[maxn], nxt[maxn], ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) {
    int j = i;
    while (j + 1 <= n && a[j + 1] > a[j]) j++;
    for (int k = i; k <= j; k++) pre[k] = i, nxt[k] = j;
    ans = max(ans, j - i + 1);
    i = j;
  }
  for (int i = 2; i <= n - 1; i++)
    if (a[i + 1] > a[i - 1]) ans = max(ans, nxt[i + 1] - pre[i - 1]);
  printf("%d\n", ans);
  return 0;
}
