#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e18;
const long long MAX = 200008;
long long n, a[MAX], ac[MAX], dc[MAX];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> n;
  for (long long i = (1); i <= (n); i++) {
    cin >> a[i];
  }
  long long ans = 0;
  ac[1] = 1;
  for (long long i = (1); i <= (n); i++) {
    if (a[i] > a[i - 1]) {
      ac[i] = ac[i - 1] + 1;
    } else {
      ac[i] = 1;
    }
    ans = max(ac[i], ans);
  }
  dc[n] = 1;
  for (long long i = (n - 1); i >= (1); i--) {
    if (a[i] < a[i + 1]) {
      dc[i] = dc[i + 1] + 1;
    } else {
      dc[i] = 1;
    }
  }
  for (long long i = (2); i <= (n - 1); i++) {
    if (a[i - 1] < a[i + 1]) {
      ans = max(ac[i - 1] + dc[i + 1], ans);
    }
  }
  cout << (ans) << endl;
  return 0;
}
