#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000 + 10;
int n, a[MAXN];
int dp[2][MAXN];
int ans;
int main(int argc, const char* argv[]) {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  dp[0][1] = 1;
  if (a[2] > a[1]) {
    dp[0][2] = 2;
  } else
    dp[0][2] = 1;
  dp[1][2] = 2;
  for (int i = 3; i <= n; i++) {
    if (a[i] > a[i - 1]) {
      dp[0][i] = max(dp[0][i], dp[0][i - 1] + 1);
      dp[1][i] = max(dp[1][i], dp[1][i - 1] + 1);
    } else {
      dp[0][i] = 1;
    }
    if (a[i] > a[i - 2] + 1) {
      dp[1][i] = max(dp[1][i], dp[0][i - 2] + 2);
    }
  }
  for (int i = 1; i <= n; i++) {
    ans = max(ans, dp[0][i] + 1);
    ans = max(ans, dp[1][i]);
  }
  if (ans > n) {
    ans = n;
  }
  cout << ans << endl;
  return 0;
}
