#include <bits/stdc++.h>
const long long mod = 998244353;
const long long MOD = 1000000007;
const long long INFLL = (1LL << 62) - 1;
const int INF = (1 << 30) - 1;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const long double pi = 2 * asin(1);
using namespace std;
int main() {
  int ans = 1;
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  vector<vector<int>> dp(n, vector<int>(2, 1));
  dp[0][0] = 1;
  dp[0][1] = 0;
  for (int i = 0; i < (n - 1); i++) {
    if (a[i] < a[i + 1]) {
      dp[i + 1][0] = dp[i][0] + 1;
      dp[i + 1][1] = dp[i][1] + 1;
    } else {
      dp[i + 1][0] = 1;
      dp[i + 1][1] = 1;
    }
    if (i >= 1 && a[i + 1] > a[i - 1]) {
      dp[i + 1][1] = max(dp[i + 1][1], dp[i - 1][0] + 1);
    }
    ans = max(ans, max(dp[i + 1][0], dp[i + 1][1]));
  }
  cout << ans << endl;
}
