#include <bits/stdc++.h>
using namespace std;
int a[111111], l[111111], r[111111];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    l[i] = a[i - 1] < a[i] ? l[i - 1] + 1 : 1;
  }
  for (int i = n; 0 < i; i--) {
    r[i] = a[i] < a[i + 1] ? r[i + 1] + 1 : 1;
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    ans = a[i - 1] + 1 < a[i + 1]
              ? max(ans, l[i - 1] + 1 + r[i + 1])
              : max(max(ans, l[i - 1] + 1), max(ans, r[i + 1] + 1));
  }
  cout << ans;
  return 0;
}
