#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 55;
const int INF = 1e9 + 77;
const int MOD = 1e9 + 7;
const double PI = 2 * acos(0.0);
const double EPS = 1e-7;
const int N = (int)2e5 + 55;
int a[N];
int dp[N][2];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  dp[0][0] = 1;
  dp[0][1] = 0;
  dp[1][0] = 1 + (a[1] > a[0]);
  dp[1][1] = 1;
  int ans = max(dp[1][0], dp[1][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] = 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]);
  }
  cout << ans;
  return 0;
}
