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