#include <bits/stdc++.h>
using namespace std;
vector<int> adj[200015];
int main() {
  long long int n, m;
  cin >> n;
  long long int ar[n + 2];
  for (int i = 0; i < n; i++) cin >> ar[i];
  long long int cnt = 0;
  adj[cnt].push_back(ar[0]);
  for (int i = 1; i < n; i++) {
    if (ar[i] > ar[i - 1])
      adj[cnt].push_back(ar[i]);
    else {
      cnt++;
      adj[cnt].push_back(ar[i]);
    }
  }
  cnt++;
  long long int sum = adj[0].size();
  for (int i = 0; i < cnt; i++) {
    long long int ans = adj[i].size();
    long long int ans1 = ans;
    if (i >= 1) {
      if (adj[i - 1].size() > 1) {
        if (adj[i][0] > adj[i - 1][adj[i - 1].size() - 2]) {
          ans += adj[i - 1].size() - 1;
        }
      }
    }
    if (i > 1) {
      if (adj[i][0] > adj[i - 2][adj[i - 2].size() - 1]) {
        ans1 += adj[i - 2].size();
      }
    }
    sum = max(sum, max(ans, ans1));
    ans = adj[i].size();
    ans1 = ans;
    if (i < cnt - 1) {
      if (adj[i + 1].size() > 1) {
        if (adj[i + 1][1] > adj[i][adj[i].size() - 1]) {
          ans += adj[i + 1].size() - 1;
        }
      }
      if (adj[i].size() > 1) {
        if (adj[i + 1][0] > adj[i][adj[i].size() - 2]) {
          ans1 += adj[i + 1].size() - 1;
        }
      }
    }
    sum = max(sum, max(ans, ans1));
  }
  cout << sum << endl;
  return 0;
}
