#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 4;
const int mod = 1e9 + 7;
const long long INF = 1e16;
const int inf = 1e9;
int a[N], d[N];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  ;
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  int mx = 1;
  for (int i = n; i >= 1; --i) {
    if (a[i] < a[i + 1]) {
      d[i] = d[i + 1] + 1;
    } else {
      d[i] = 1;
    }
    mx = max(mx, d[i]);
  }
  int cur = 1;
  for (int i = 2; i < n; ++i) {
    if (a[i + 1] > a[i - 1]) {
      mx = max(mx, cur + d[i + 1]);
    }
    if (a[i] > a[i - 1])
      cur++;
    else
      cur = 1;
  }
  cout << mx;
}
