#include <bits/stdc++.h>
using namespace std;
const int N = 2e5;
int df[N + 100], dr[N + 100], arr[N + 100];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", arr + i);
  }
  df[1] = 1;
  int ans = 1;
  for (int i = 2; i <= n; i++) {
    if (arr[i] > arr[i - 1]) {
      df[i] = df[i - 1] + 1;
    } else {
      df[i] = 1;
    }
    ans = max(ans, df[i]);
  }
  dr[n] = 1;
  for (int i = n - 1; i > 0; i--) {
    if (arr[i] < arr[i + 1]) {
      dr[i] = dr[i + 1] + 1;
    } else {
      dr[i] = 1;
    }
  }
  for (int i = 2; i < n; i++) {
    if (arr[i - 1] < arr[i + 1]) {
      ans = max(ans, df[i - 1] + dr[i + 1]);
    }
  }
  printf("%d\n", ans);
}
