#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<pair<int, int> > dp(n);
  dp[n - 1].second = 0;
  dp[n - 1].first = 1;
  int mx = 0;
  for (int i = n - 2; i > -1; i--) {
    if (a[i + 1] > a[i])
      dp[i].second = dp[i + 1].second + 1;
    else
      dp[i].second = 0;
    if (a[i] < a[i + 1]) {
      dp[i].first = dp[i + 1].first + 1;
    } else
      dp[i].first = 1;
    if (i < n - 2 && a[i + 2] > a[i])
      dp[i].second = max(dp[i].second, dp[i + 2].first + 1);
    mx = max(mx, dp[i].first);
    mx = max(mx, dp[i].second);
  }
  cout << mx;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
