#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long N = 1e6 + 50;
const long long INF = 2e18;
int dp[N][2], a[N];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i < n + 1; ++i) {
    cin >> a[i];
  }
  int ans = 0;
  for (int i = 1; i < n + 1; ++i) {
    if (a[i] > a[i - 1]) {
      dp[i][0] = dp[i - 1][0] + 1;
      dp[i][1] = dp[i - 1][1] + 1;
    } else
      dp[i][0] = 1;
    if (i > 2 && a[i - 2] < a[i]) dp[i][1] = max(dp[i][1], dp[i - 2][0] + 1);
    ans = max({ans, dp[i][0], dp[i][1]});
  }
  cout << ans << endl;
}
