#include <bits/stdc++.h>
using namespace std;
int main() {
  int cnt = 0;
  cin >> cnt;
  vector<int> nums(cnt + 2, 0);
  vector<int> endLens(cnt + 2, 0);
  vector<int> beginLens(cnt + 2, 0);
  int num = 0, prev = 0;
  for (int i = 1; i <= cnt; i++) {
    cin >> num;
    nums[i] = num;
  }
  for (int i = 1; i <= cnt; i++) {
    endLens[i] = (nums[i] > nums[i - 1] ? endLens[i - 1] + 1 : 1);
  }
  for (int j = cnt; j >= 1; j--) {
    beginLens[j] = (nums[j + 1] > nums[j] ? beginLens[j + 1] + 1 : 1);
  }
  int maxLen = 0;
  for (int i = 1; i <= cnt; i++) {
    if (nums[i + 1] - nums[i - 1] >= 2) {
      int newLen = endLens[i - 1] + beginLens[i + 1] + 1;
      maxLen = newLen > maxLen ? newLen : maxLen;
    } else {
      maxLen = (endLens[i - 1] + 1) > maxLen ? (endLens[i - 1] + 1) : maxLen;
      maxLen =
          (beginLens[i + 1] + 1) > maxLen ? (beginLens[i + 1] + 1) : maxLen;
    }
  }
  cout << maxLen << endl;
  return 0;
}
