#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
long long a[2 * N + 5];
long long prefix[2 * N + 5];
long long suffix[2 * N + 5];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long cc = 1;
  prefix[0] = 1;
  long long ans = 1;
  for (int i = 1; i < n; i++) {
    if (a[i] - a[i - 1] > 0) {
      cc++;
      prefix[i] = cc;
    } else {
      cc = 1;
      prefix[i] = cc;
    }
    if (prefix[i] > ans) {
      ans = prefix[i];
    }
  }
  cc = 1;
  suffix[n - 1] = 1;
  for (int i = n - 2; i >= 0; i--) {
    if (a[i + 1] - a[i] > 0) {
      cc++;
      suffix[i] = cc;
    } else {
      cc = 1;
      suffix[i] = cc;
    }
  }
  for (int i = 1; i < n - 1; i++) {
    if (a[i + 1] > a[i - 1]) {
      long long x = suffix[i + 1] + prefix[i - 1];
      if (x > ans) {
        ans = x;
      }
    }
  }
  cout << ans << endl;
}
