#include <bits/stdc++.h>
using namespace std;
vector<long long int> vec;
long long int n;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  for (long long int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    vec.push_back(x);
  }
  long long int left[n], right[n];
  memset(left, 0, sizeof(left));
  memset(right, 0, sizeof(right));
  left[0] = 1;
  long long int count = 1;
  for (long long int i = 1; i < n; i++) {
    if (vec[i] > vec[i - 1]) {
      count += 1;
      left[i] += count;
    } else {
      count = 1;
      left[i] = count;
    }
  }
  count = 1;
  right[n - 1] = 1;
  for (long long int i = n - 2; i >= 0; i--) {
    if (vec[i] < vec[i + 1]) {
      count += 1;
      right[i] += count;
    } else {
      count = 1;
      right[i] = count;
    }
  }
  long long int ans = 0;
  for (long long int i = 0; i < n; i++) {
    long long int x = 0, y = 0;
    x = left[i] + right[i] - 1;
    if (i + 2 < n)
      if (vec[i] < vec[i + 2]) y = right[i + 2] + left[i];
    long long int z = max(x, y);
    ans = max(ans, z);
  }
  cout << ans << endl;
  return 0;
}
