#include <bits/stdc++.h>
using namespace std;
vector<int> arr;
int n;
int dp[100001][2][2];
int busquedad(int x, int t, int q) {
  if (x == n - 1) return 1;
  if (dp[x][t][q] != -1) return dp[x][t][q];
  dp[x][t][q] = 1;
  if (arr[x] < arr[x + 1]) {
    dp[x][t][q] = max(dp[x][t][q], busquedad(x + 1, t, 0) + 1);
  }
  if (t != 1) {
    int aux = arr[x + 1];
    arr[x + 1] = arr[x] + 1;
    dp[x][t][q] = max(dp[x][t][q], busquedad(x + 1, 1, 1) + 1);
    arr[x + 1] = aux;
  }
  return dp[x][t][q];
}
int main() {
  cin >> n;
  memset(dp, -1, sizeof dp);
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    arr.push_back(x);
  }
  int resp = 1;
  for (int d = 0; d < n - 1; d++) {
    if (arr[d] < arr[d + 1]) {
      resp = max(resp, busquedad(d + 1, 0, 0) + 1);
    }
    int aux = arr[d + 1];
    arr[d + 1] = arr[d] + 1;
    resp = max(resp, busquedad(d + 1, 1, 1) + 1);
    arr[d + 1] = aux;
    resp = max(resp, busquedad(d + 1, 1, 0) + 1);
  }
  cout << resp << endl;
  return 0;
}
