#include using namespace std; long long Max1=1000000007; long long **choose1; int n; void choose(){ long long ans1=1; long long i,j; choose1=new long long*[n+1]; for(i=1;i<=n;i++){ ans1=1; choose1[i]=new long long[n+1]; for(j=1;j<=i;j++){ ans1*=(long long)(i-j+1); if(ans1>=Max1) ans1=ans1%Max1; choose1[i][j]=ans1; } } } int main(){ cin >> n; vector m(n+1); for(int m_i = 1; m_i <= n; m_i++){ cin >> m[m_i]; } int *a; a= new int[n+1]; int num=1; int p1=n, p,st=0; a[1]=1; int st1=0; for(int i=2;i<=n;i++){ if(m[i]>=m[i-1]){ num++; if(p1p1) p++; a[i]=num/p; } else{ a[i]=num; } } else{ if(st1==0) a[0]=num; p1=a[i-1]; num=1; a[i]=num; st1=1; } } if(st1==0) a[0]=num; long long **p2; int i; long long j,j1; p2=new long long*[n+1]; //for(i=0;i<=n;i++) cout<n) break; if(j1!=1&&m[i+j1]=Max1) p2[i+j1][j1]=p2[i+j1][j1]%Max1; } } } } //cout<=Max1) ans-=Max1; } cout<