#include <bits/stdc++.h>
using namespace std;
long long ar[200004], ara[200004];
int main() {
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> ar[i];
  long long cnt = 1;
  ara[1] = 1;
  long long last = 1;
  long long ans = 0;
  for (long long i = 2; i <= n + 1; i++) {
    if (ar[i] > ar[i - 1])
      cnt++;
    else {
      for (long long j = last; j < i; j++) ara[j] = cnt;
      cnt = 1;
      last = i;
    }
    ans = max(ans, cnt);
  }
  for (long long i = 1; i <= n; i++) {
    long long p = 0;
    if (ar[i] >= ar[i + 1] && ar[i - 1] < ar[i + 1])
      p = ara[i + 1] + ara[i - 1] - 1;
    else if (ar[i] <= ar[i - 1] && ar[i + 1] > ar[i - 1])
      p = ara[i + 1] + ara[i - 1] - 1;
    ans = max(ans, p);
  }
  cout << ans << endl;
  return 0;
}
