#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int test = 1;
  while (test--) {
    int n;
    cin >> n;
    vector<int> a(n);
    for (long long i = 0; i < n; ++i) cin >> a[i];
    vector<int> dp(n, 0);
    vector<int> left(n), right(n);
    for (long long i = 0; i < n; ++i) {
      if (i == 0 or a[i - 1] >= a[i]) {
        left[i] = 1;
      } else {
        left[i] = left[i - 1] + 1;
      }
    }
    for (long long i = n - 1; i >= 0; i--) {
      if (i == n - 1 or a[i + 1] <= a[i]) {
        right[i] = 1;
      } else {
        right[i] = 1 + right[i + 1];
      }
    }
    int ans = 0;
    for (long long i = 0; i < n; ++i) {
      if (i > 0) ans = max(ans, 1 + left[i - 1]);
      if (i < n - 1) ans = max(ans, 1 + right[i + 1]);
      if (a[i + 1] - a[i - 1] >= 2 and i > 0 and i < n - 1)
        ans = max(ans, 1 + left[i - 1] + right[i + 1]);
    }
    cout << (n == 1 ? 1 : ans) << "\n";
  }
}
