#include <bits/stdc++.h>
using namespace std;
pair<int, int> arr[(int)2e5 + 3];
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  int res = 1, mx = 0;
  vector<int> v1;
  for (int i = 1; i < n; i++) {
    if (v[i] > v[i - 1]) {
      res++;
    } else {
      v1.push_back(res);
      if (res > mx) mx = res;
      arr[v1.size() - 1].first = i - res;
      arr[v1.size() - 1].second = i - 1;
      res = 1;
    }
  }
  v1.push_back(res);
  arr[v1.size() - 1].first = n - res;
  arr[v1.size() - 1].second = n - 1;
  if (res > mx) mx = res;
  if (v1.size() == 1) {
    cout << n;
    return 0;
  }
  int ans = mx;
  for (int i = 1; i < v1.size(); i++) {
    if (arr[i - 1].second - 1 < 0) continue;
    if (v[arr[i].first] - v[arr[i - 1].second - 1] > 0) {
      if (v1[i] + v1[i - 1] - 1 > ans) {
        ans = v1[i] + v1[i - 1] - 1;
      }
    }
  }
  for (int i = 0; i < v1.size() - 1; i++) {
    if (arr[i + 1].first + 1 >= n) break;
    if (v[arr[i].second] < v[arr[i + 1].first + 1]) {
      if (v1[i] + v1[i + 1] > ans) {
        ans = v1[i] + v1[i + 1] - 1;
      }
    }
  }
  cout << ans;
  return 0;
}
