#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 1;
int a[N], dp[N];
vector<int> pos;
int n;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(0);
  ;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  dp[0] = 1;
  pos.push_back(0);
  for (int i = 1; i < n; i++) {
    if (a[i - 1] < a[i])
      dp[i] = 1 + dp[i - 1];
    else {
      dp[i] = 1;
      pos.push_back(i - 1);
    }
  }
  pos.push_back(n - 1);
  int m = 1;
  for (int i = 0; i < n; i++) m = max(m, dp[i]);
  for (int i = 1; i < pos.size() - 1; i++) {
    int val1 = dp[pos[i] - 1];
    int val2 = dp[pos[i + 1]];
    if (a[pos[i] - 1] < a[pos[i] + 1]) m = max(m, val1 + val2);
    val1 = dp[pos[i]];
    val2 = dp[pos[i + 1]] - 1;
    if (a[pos[i]] < a[pos[i] + 2]) m = max(m, val1 + val2);
  }
  cout << m << "\n";
  return 0;
}
