#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 200100;
const long long INF = 2000000100;
const long long MOD = 998244353;
int N, B, A[MAXN], S[MAXN];
vector<int> G;
int ans;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> N;
  for (int i = 0; i < N; i++) cin >> A[i];
  A[N] = -39;
  G.push_back(0);
  for (int i = 1; i <= N; i++) {
    if (A[i] <= A[i - 1]) {
      G.push_back(i);
    }
  }
  B = G.size() - 1;
  for (int i = 0; i < B; i++) {
    S[i] = G[i + 1] - G[i];
    ans = max(ans, S[i]);
  }
  for (int i = 0; i < B; i++) {
    if (S[i] == 1) {
      if (i != 0 && i != B - 1) {
        if (A[G[i] - 1] < A[G[i] + 1]) ans = max(ans, S[i - 1] + S[i + 1]);
      }
    } else {
      if (i != 0) {
        if (A[G[i] - 1] < A[G[i] + 1]) ans = max(ans, S[i - 1] + S[i] - 1);
      }
      if (i != B - 1) {
        if (A[G[i + 1] - 2] < A[G[i + 1]]) ans = max(ans, S[i] + S[i + 1] - 1);
      }
    }
  }
  cout << ans << "\n";
}
