#include <bits/stdc++.h>
using namespace std;
const long long N = 3e5;
long long dp[5][N];
long long arr[N];
int main() {
  long long n, MAX = 0;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", arr + i);
  }
  dp[0][1] = 1;
  dp[2][n] = 1;
  for (long long i = 2; i <= n; i++) {
    if (arr[i] > arr[i - 1]) {
      dp[0][i] = dp[0][i - 1] + 1;
      MAX = max(MAX, dp[0][i]);
    } else {
      dp[0][i] = 1;
    }
  }
  for (long long i = 2; i < n; i++) {
    if (arr[i + 1] > arr[i - 1]) {
      dp[1][i] = dp[0][i - 1];
    }
  }
  dp[1][n] = dp[0][n - 1];
  for (long long i = n - 1; i >= 1; i--) {
    if (arr[i + 1] > arr[i]) {
      dp[2][i] = dp[2][i + 1] + 1;
    } else {
      dp[2][i] = 1;
    }
  }
  for (long long i = n - 1; i >= 2; i--) {
    if (arr[i + 1] > arr[i - 1]) {
      dp[3][i] = dp[2][i + 1];
    }
  }
  dp[3][1] = dp[2][2];
  for (long long i = 1; i <= n; i++) {
    MAX = max(dp[1][i] + dp[3][i], MAX);
  }
  cout << MAX << endl;
  return 0;
}
