G: Working

Kou decided to do the same number of jobs every day for the next $ N $.

$ A_i $ jobs are added on the $ i $ day of the $ N $ day.

Mr. Kou has no work to do now, and he doesn't have to finish all the work by the $ N $ day.

How many jobs can you do in a day?

However, Mr. Kou is excellent, so he can do as many jobs as he has.

input

$ N $ is given on the first line.

On the second line, $ N $ integers $ A_1, A_2, A_3, \ dots, A_N $ are given, separated by blanks.

output

Output the maximum number of jobs you can do in a day. Insert a line break at the end.

Constraint

* $ N $ is an integer greater than or equal to $ 1 $ and less than or equal to $ 100 $
* $ A_1, A_2, A_3, \ dots, A_N $ are integers between $ 1 $ and $ 100 $



Input example 1


Five
4 2 5 3 1


Output example 1


3


If you decide to work more than $ 4 $ a day, you'll run out of work on the second day.

Input example 2


Five
9 9 1 9 9


Output example 2


6






Example

Input

5
4 2 5 3 1


Output

3
#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
const int INF=1e9,MOD=1e9+7,ohara=1e6;
const ll LINF=1e18;
using namespace std;

#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,a,b) for(int i=(a);i<(b);i++)
#define rrrep(i,a,b) for(int i=(a);i>=(b);i--)
#define all(v) (v).begin(), (v).end()
#define Size(n) (n).size()
#define Cout(x) cout<<(x)<<endl

ll n,cnt,ans,a[ohara],b[ohara],c,d,tmp,tmpp,m,h,w,x,y,sum,pos,k;
ld doua;
int dy[]={1,0,-1,0};
int dx[]={0,1,0,-1};
//int dy[]={-1,0,1,-1,1,-1,0,1};
//int dx[]={-1,-1,-1,0,0,1,1,1};
string alph("abcdefghijklmnopqrstuvwxyz"),s;
bool fl;
struct edge{int to,cost;};

//-------------------------↓↓↓↓↓↓------------------------

int main(void){
       cin.tie(0);
    ios::sync_with_stdio(false);

    cin>>n;
    rep(i,n){
        cin>>a[i];
        c=max(c,a[i]);
    }
    rrrep(i,c,0){
        rep(j,n)b[j]=a[j];
        fl=true;
        rep(j,n){
            if(b[j]<i){
                fl=false;
                continue;
            }
            b[j]-=i;
            b[j+1]+=b[j];
        }
        if(!fl)continue;
        Cout(i);
        return 0;
    }
    return 0;
}

