#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define sd second
#define debug(x) cerr << #x << " ----> " << x << endl;
const int mxN = 1e6 + 5;
ll n,a[mxN];
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n;
set<pair<ll,ll>> s;
for(int i = 1; i <= n; i++){
cin >> a[i];
s.insert({a[i], i});
}
ll ans = 0,curr = 1;
for(auto it : s){
ll i = it.sd;
curr--;
if(i < n and a[i] <= a[i + 1]) curr++;
if(i > 1 and a[i] < a[i - 1]) curr++;
ans = max(ans, curr);
}
cout << ans;
}