#include <bits/stdc++.h>
using namespace std;
int n, A[200010], L[200010], R[200010], ans = 1;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &A[i]);
    L[i] = R[i] = 1;
  }
  for (int i = 2; i <= n; i++) {
    if (A[i - 1] < A[i]) L[i] = L[i - 1] + 1;
    ans = max(ans, L[i]);
  }
  for (int i = n - 1; i >= 1; i--) {
    if (A[i] < A[i + 1]) R[i] = R[i + 1] + 1;
    ans = max(ans, R[i]);
  }
  for (int i = 1; i <= n - 2; i++) {
    if (A[i] < A[i + 2]) ans = max(ans, L[i] + R[i + 2]);
  }
  printf("%d", ans);
  return 0;
}
