#include <bits/stdc++.h>
using namespace std;
const int N=1e5;
int n,res=0,a[N+1],b[N+1],c[N+1];
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
   freopen("BAI3.inp","r",stdin);
   freopen("BAI3.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++) cin>>a[i];
    b[1]=1;
    for(int i=2;i<=n;i++)
        if(a[i]>a[i-1]) b[i]=b[i-1]+1; else b[i]=1;
    c[n]=1;
    for(int i=n-1;i>=1;i--)
        if(a[i]>a[i+1]) c[i]=c[i+1]+1;else c[i]=1;
    for(int i=1;i<=n;i++)
        if(b[i]!=1&&c[i]!=1) res=max(res,b[i]+c[i]-1);
    cout<<res;
    return 0;
}
