#include<iostream>
using namespace std;
int main(){
int arr[10000],n,broqch=0,raztoqnie=0,brLokMax,purvi=0,vtori=-14325;
bool purviPrimer=false;
cin>>n;
for(int i=0;i<n;i++){
    cin>>arr[i];
}
int m=n-1;
for(int j=1;j<m;j++){
    if(arr[j]>arr[j+1] && arr[j]>arr[j-1]){
        if(purviPrimer==false){
            purvi=arr[j];
            purviPrimer=true;
            break;
            cout<<"vednuv ";
        }
        if(vtori==-14325){
            vtori=arr[j];
            raztoqnie=broqch;
            broqch=0;
            break;
            cout<<"oshte vednuv ";
        }
        if(raztoqnie>broqch){
            raztoqnie=broqch;
            broqch=0;
            cout<<"normalno ";
        }
    }
     broqch++;
     cout<<broqch<<"morkov ";
}
cout<<raztoqnie;
return 0;
}
