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>
using namespace std;
#define lp(i,n) for(int i=0;i<n;i++)
#define lps(i,j,n) for(int i=j;i<n;i++)
#define fordebug int hoge;cin>>hoge;
#define DEKAI 1000000007;
#define INF (1<<28)
#define int long long
#define double long double
#define floot10 cout<<fixed<<setprecision(10)



signed main(){
  int n;
  cin>>n;
  int l=0,r=10000;
  int m;
  int a[100];
  lp(i,n){
    cin>>a[i];
  }
  lp(z,30){
    m=(l+r)/2;
    int cnt=0;
    bool check=true;
    lp(i,n){
      cnt+=a[i];
      cnt-=m;
      if(cnt<0){
	check=false;
      }
    }
    if(check==true){
      l=m;
    }
    else{
      r=m;
    }
  }
  m++;
  while(1){
    int cnt=0;
    bool check=true;
    lp(i,n){
      cnt+=a[i];
      cnt-=m;
      if(cnt<0){
	check=false;
      }
    }
    if(check==true){
      cout<<m<<endl;
      return 0;
    }
    else{
      m--;
    }
  }
  return 0;
}


