#include <bits/stdc++.h>
using namespace std;
int a[200005];
int dp[200005][2];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  dp[1][0] = 1;
  int ans = 1;
  for (int i = 2; i <= n; i++) {
    dp[i][0] = 1;
    if (a[i] > a[i - 1]) {
      dp[i][0] = dp[i - 1][0] + 1;
      dp[i][1] = max(dp[i][1], dp[i - 1][1] + 1);
    }
    if (a[i] > a[i - 2]) {
      dp[i][1] = max(dp[i][1], dp[i - 2][0] + 1);
    }
    ans = max(ans, dp[i][0]);
    ans = max(ans, dp[i][1]);
  }
  printf("%d\n", ans);
  return 0;
}
