            #include <bits/stdc++.h>
            using namespace std;
            typedef long long ll;
            #define pb push_back
            #define f first
            #define s second
            const int MAX=1e5+55;
            ll x[3*MAX];
            int main()
            {
        ios_base::sync_with_stdio(0);
        cin.tie(0);
        cout.tie(0);
        bool t=1;

  int n;
  cin>>n;
  ll MIN=10000000000;
  for(int i=1;i<=n;i++){
    cin>>x[i];
    MIN=min(MIN,x[i]);
            }
    if(MIN*(n-1)<=min(x[1],x[n])){
       cout<<MIN; return 0;}
     MIN/=2;
     if(MIN*(n-1)<=min(x[1],x[n]))
     {
         cout<<MIN; return 0;
     }
    else
    {

        ll m=min(x[1],x[n]);
        ll mm=(MIN*(n-1))-m;
        MIN-=mm;cout<<MIN;
        cout<<MIN;
    }

                return 0;
            }


                #include <bits/stdc++.h>
                using namespace std;
                typedef long long ll;
                #define pb push_back
                #define f first
                #define s second
                const int MAX=1e5+55;
                ll x[3*MAX];
                int main()
                {
            ios_base::sync_with_stdio(0);
            cin.tie(0);
            cout.tie(0);
            bool t=1;

      int n;
      cin>>n;
      ll MIN=10000000000;
       ll ans=10000000000;
      for(int i=1;i<=n;i++){
        cin>>x[i];
      MIN=min(MIN,x[i]);
                }

       for(int i=1;i<=n;i++)
       {

        if(MIN*(i-1)<=x[i])
            continue;
        else
        {
            while(MIN*(i-1)>x[i])
            {
                MIN/=2;
            }

        }
       }
       cout<<MIN;

                    return 0;
                }


                #include <bits/stdc++.h>
                using namespace std;
                typedef long long ll;
                #define pb push_back
                #define f first
                #define s second
                const int MAX=1e5+55;
                ll x[3*MAX];
                int main()
                {
            ios_base::sync_with_stdio(0);
            cin.tie(0);
            cout.tie(0);
            bool t=1;

      int n;
      cin>>n;
      ll MIN=10000000000;
      for(int i=1;i<=n;i++){
        cin>>x[i];
        MIN=min(MIN,x[i]);
                }
        if(MIN*(n-1)<=min(x[1],x[n])){
           cout<<MIN; return 0;}
         MIN/=2;
         if(MIN*(n-1)<=min(x[1],x[n]))
         {
             cout<<MIN; return 0;
         }
        while(MIN!=0)
        {

            ll m=min(x[1],x[n]);
            ll mm=(MIN*(n-1))-m;
            if((MIN*(n-1))<=m){
            cout<<MIN; return 0;}
            MIN--;
        }

                    return 0;
                }


                #include <bits/stdc++.h>
                using namespace std;
                typedef long long ll;
                #define pb push_back
                #define f first
                #define s second
                const int MAX=1e5+55;
                ll x[3*MAX];
                int main()
                {
            ios_base::sync_with_stdio(0);
            cin.tie(0);
            cout.tie(0);
            bool t=1;

      int n;
      cin>>n;
      ll MIN=100000000000;
       ll ans=100000000000;
      for(int i=0;i<n;i++){
        cin>>x[i];
      MIN=min(MIN,x[i]);
                }

       for(int i=0;i<n;i++)
       {
         ans=min(ans,x[i]/max(i,n-i-1));

       }
       cout<<ans;

                    return 0;
                }


                #include <bits/stdc++.h>
                using namespace std;
                typedef long long ll;
                #define pb push_back
                #define f first
                #define s second
                const int MAX=1e5+55;
                ll x[3*MAX];
                int main()
                {
            ios_base::sync_with_stdio(0);
            cin.tie(0);
            cout.tie(0);
            bool t=1;

      int n;
      cin>>n;
      ll MIN=10000000000;
       ll ans=10000000000;
      for(int i=1;i<=n;i++){
        cin>>x[i];
      MIN=min(MIN,x[i]);
                }

       for(int i=1;i<=n;i++)
       {

        if(MIN*(i-1)<=x[i])
            continue;
        else
        {
            while(MIN*(i-1)>=x[i])
            {
               MIN--;
            }

        }
       }
       cout<<MIN;

                    return 0;
                }


                #include <bits/stdc++.h>
                using namespace std;
                typedef long long ll;
                #define pb push_back
                #define f first
                #define s second
                const int MAX=1e5+55;
                ll x[3*MAX];
                int main()
                {
            ios_base::sync_with_stdio(0);
            cin.tie(0);
            cout.tie(0);
            bool t=1;

      int n;
      cin>>n;
      ll MIN=10000000000;
       ll ans=10000000000;
      for(int i=1;i<=n;i++){
        cin>>x[i];
      MIN=min(MIN,x[i]);
                }

       for(int i=1;i<=n-1;i++)
       {

        if(MIN*(i-1)<=x[i])
            continue;
        else
        {
            while(MIN*(i-1)>x[i])
            {
                MIN/=2;
            }

        }
       }
       cout<<MIN;

                    return 0;
                }


#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
	ll n,i,j,k=0;
	cin>>n;
	ll a[n],b[n],c[n];
	for(i=0;i<n;i++)
	{
		cin>>a[i];
		b[i]=9999999999;
		c[i]=9999999999;
	}
	for(i=0;i<n-1;i++)
	{
		for(j=i+1;j<n;j++)
		{
			c[k]=min(a[i],a[j])/abs(i-j);
			k++;
		}
	}
	sort(c,c+n);
	cout<<c[0];
}


#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
	ll n,i,j,k=0;
	cin>>n;
	ll a[n],b[n],c[n],d[n];
	for(i=0;i<n;i++)
	{
	b[i]=9999999999;
	c[i]=9999999999;
	}
	for(i=0;i<n;i++)
	{
		cin>>a[i];
		if(i!=0)
		b[i]=a[i]/i;
		if(i!=n-1)
		c[i]=a[i]/(n-1-i);
		d[i]=min(b[i],c[i]);
	}

	sort(d,d+n);
	cout<<d[0];
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int n,i,m;
	cin>>n;
	long long int a[n];
	for(i=0;i<n;i++)
	cin>>a[i];
	if(a[0]>a[n-1])
	m=a[n-1];
	else
	m=a[0];
	long long int k1=abs(m/(n-1));
	sort(a,a+n);
	long long int k2=abs(a[0]);
	if(k1<k2)
	cout<<k1;
	else
	cout<<k2;
}


#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
	ll n,i,j,k=0;
	cin>>n;
	ll a[n],b[n],c[n];
	for(i=0;i<n;i++)
	{
		cin>>a[i];
		b[i]=999999999;
		c[i]=999999999;
	}
	for(i=0;i<n-1;i++)
	{
		for(j=i+1;j<n;j++)
		{
			c[k]=min(a[i],a[j])/abs(i-j);
			k++;
		}
	}
	sort(c,c+n);
	cout<<c[0];
}


// by VIDIT BHARDWAJ
#include<bits/stdc++.h>
#include<ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> pbds;

// when we want to insert same element multiple times into pbds
// typedef tree<pair<int,int>,null_type,less<pair<int,int > >,rb_tree_tag,tree_order_statistics_node_update> pbds;

#define int                     long long int
#define pb                      push_back
#define mk(arr,n,type)          type *arr=new type[n]; //mk(pos,n,vector<int>)
#define setbits(x)              __builtin_popcountll(x)
#define zerobits(x)             __builtin_ctzll(x)
#define ps(x,y)                 fixed<<setprecision(y)<<x // cout<<ps(1.255114,4)
#define tc(t)                   int t; cin>>t; while(t--)

const long long mod=1000000007;
const int inf=1000000000000000000;
const long double pi = 3.14159265358979323846264338;

bool double_compare(double a, double b, double epsilon = 0.001)
{
    return std::abs(a - b) < epsilon;
}
int lcm(int a,int b){
    return (a*b)/__gcd(a,b);
}
bool isPrime(int n)
{
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (int i = 5; i * i <= n; i = i + 6){
        if (n % i == 0 || n % (i + 2) == 0)
            return false;
    }

    return true;
}
// Fermat's little theorem
int pow(int a, unsigned int b,int mod1){

    int ans=1;
    while(b){

        if(b&1ll){

            ans*=a;
            ans%=mod1;
        }
        b/=2;
        a*=a;
        a%=mod1;
    }

    return ans;
}
int inverse(int a,int mod1){

    return pow(a,mod1-2,mod1);    // a^-1%p
}
///////////////////////////////////////////////////////////////////////////////////////////////////

signed main()
{
    int n; cin>>n;
    int ans=INT_MAX;
    for(int i=0;i<n;i++){
        int x; cin>>x;
        ans=min(ans,x/max(i,n-i-1));
    }

    cout<<ans;

    return 0;
}

/*
enola holmes
*/


// by VIDIT BHARDWAJ
#include<bits/stdc++.h>
#include<ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> pbds;

// when we want to insert same element multiple times into pbds
// typedef tree<pair<int,int>,null_type,less<pair<int,int > >,rb_tree_tag,tree_order_statistics_node_update> pbds;

#define int                     long long int
#define pb                      push_back
#define mk(arr,n,type)          type *arr=new type[n]; //mk(pos,n,vector<int>)
#define setbits(x)              __builtin_popcountll(x)
#define zerobits(x)             __builtin_ctzll(x)
#define ps(x,y)                 fixed<<setprecision(y)<<x // cout<<ps(1.255114,4)
#define tc(t)                   int t; cin>>t; while(t--)

const long long mod=1000000007;
const int inf=1000000000000000000;
const long double pi = 3.14159265358979323846264338;

bool double_compare(double a, double b, double epsilon = 0.001)
{
    return std::abs(a - b) < epsilon;
}
int lcm(int a,int b){
    return (a*b)/__gcd(a,b);
}
bool isPrime(int n)
{
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (int i = 5; i * i <= n; i = i + 6){
        if (n % i == 0 || n % (i + 2) == 0)
            return false;
    }

    return true;
}
// Fermat's little theorem
int pow(int a, unsigned int b,int mod1){

    int ans=1;
    while(b){

        if(b&1ll){

            ans*=a;
            ans%=mod1;
        }
        b/=2;
        a*=a;
        a%=mod1;
    }

    return ans;
}
int inverse(int a,int mod1){

    return pow(a,mod1-2,mod1);    // a^-1%p
}
///////////////////////////////////////////////////////////////////////////////////////////////////

signed main()
{
    int n; cin>>n;
    int a[n+1];
    a[0]=-1;
    set<pair<int,int> > s;
    int mn=INT_MAX,mn_indx=-1;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        s.insert({a[i],i});
        if(mn>a[i]){
            mn_indx=i;
            mn=min(mn,a[i]);
        }
    }

    sort(a,a+n+1);

    int sm=a[n-1],m=a[n];
    int lsm=INT_MAX,rsm=INT_MIN,lm=INT_MAX,rm=INT_MIN;
    for(auto x:s){

        if(x.first==sm){
            lsm=min(lsm,x.second);
            rsm=max(rsm,x.second);
            if(sm==m){
                lm=min(lm,x.second);
                rm=max(rm,x.second);
            }
        }
        else if(x.first==m){
            lm=min(lm,x.second);
            rm=max(rm,x.second);
        }
    }

    int p=abs(lsm-lm),q=abs(lsm-rm),r=abs(rsm-lm),s1=abs(rsm-rm);

    int x=max({p,q,r,s1});
    int y=sm;

    int diff=0;
    for(auto x:s){
        if(x.first==mn){
            continue;
        }
        diff=max(diff,abs(mn_indx-x.second));
    }

    if(diff<=mn){
        cout<<y/x<<endl;
    }
    else{
        cout<<0<<endl;
    }

    return 0;
}

/*

*/


// by VIDIT BHARDWAJ
#include<bits/stdc++.h>
#include<ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> pbds;

// when we want to insert same element multiple times into pbds
// typedef tree<pair<int,int>,null_type,less<pair<int,int > >,rb_tree_tag,tree_order_statistics_node_update> pbds;

#define int                     long long int
#define pb                      push_back
#define mk(arr,n,type)          type *arr=new type[n]; //mk(pos,n,vector<int>)
#define setbits(x)              __builtin_popcountll(x)
#define zerobits(x)             __builtin_ctzll(x)
#define ps(x,y)                 fixed<<setprecision(y)<<x // cout<<ps(1.255114,4)
#define tc(t)                   int t; cin>>t; while(t--)

const long long mod=1000000007;
const int inf=1000000000000000000;
const long double pi = 3.14159265358979323846264338;

bool double_compare(double a, double b, double epsilon = 0.001)
{
    return std::abs(a - b) < epsilon;
}
int lcm(int a,int b){
    return (a*b)/__gcd(a,b);
}
bool isPrime(int n)
{
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (int i = 5; i * i <= n; i = i + 6){
        if (n % i == 0 || n % (i + 2) == 0)
            return false;
    }

    return true;
}
// Fermat's little theorem
int pow(int a, unsigned int b,int mod1){

    int ans=1;
    while(b){

        if(b&1ll){

            ans*=a;
            ans%=mod1;
        }
        b/=2;
        a*=a;
        a%=mod1;
    }

    return ans;
}
int inverse(int a,int mod1){

    return pow(a,mod1-2,mod1);    // a^-1%p
}
///////////////////////////////////////////////////////////////////////////////////////////////////

signed main()
{
    int n; cin>>n;
    int ans=INT_MAX;
    for(int i=0;i<n;i++){
        int x; cin>>x;
        ans=min(ans,x/max(i,n-i-1));
    }

    cout<<ans+1;

    return 0;
}

/*

*/


// by VIDIT BHARDWAJ
#include<bits/stdc++.h>
#include<ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> pbds;

// when we want to insert same element multiple times into pbds
// typedef tree<pair<int,int>,null_type,less<pair<int,int > >,rb_tree_tag,tree_order_statistics_node_update> pbds;

#define int                     long long int
#define pb                      push_back
#define mk(arr,n,type)          type *arr=new type[n]; //mk(pos,n,vector<int>)
#define setbits(x)              __builtin_popcountll(x)
#define zerobits(x)             __builtin_ctzll(x)
#define ps(x,y)                 fixed<<setprecision(y)<<x // cout<<ps(1.255114,4)
#define tc(t)                   int t; cin>>t; while(t--)

const long long mod=1000000007;
const int inf=1000000000000000000;
const long double pi = 3.14159265358979323846264338;

bool double_compare(double a, double b, double epsilon = 0.001)
{
    return std::abs(a - b) < epsilon;
}
int lcm(int a,int b){
    return (a*b)/__gcd(a,b);
}
bool isPrime(int n)
{
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (int i = 5; i * i <= n; i = i + 6){
        if (n % i == 0 || n % (i + 2) == 0)
            return false;
    }

    return true;
}
// Fermat's little theorem
int pow(int a, unsigned int b,int mod1){

    int ans=1;
    while(b){

        if(b&1ll){

            ans*=a;
            ans%=mod1;
        }
        b/=2;
        a*=a;
        a%=mod1;
    }

    return ans;
}
int inverse(int a,int mod1){

    return pow(a,mod1-2,mod1);    // a^-1%p
}
///////////////////////////////////////////////////////////////////////////////////////////////////

signed main()
{
    int n; cin>>n;
    int a[n+1];
    a[0]=-1;
    set<pair<int,int> > s;
    int mn=INT_MAX,mn_indx=-1;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        s.insert({a[i],i});
        if(mn>a[i]){
            mn_indx=i;
            mn=min(mn,a[i]);
        }
    }

    sort(a,a+n+1);

    int sm=a[n-1],m=a[n];
    int lsm=INT_MAX,rsm=INT_MIN,lm=INT_MAX,rm=INT_MIN;
    for(auto x:s){

        if(x.first==sm){
            lsm=min(lsm,x.second);
            rsm=max(rsm,x.second);
            if(sm==m){
                lm=min(lm,x.second);
                rm=max(rm,x.second);
            }
        }
        else if(x.first==m){
            lm=min(lm,x.second);
            rm=max(rm,x.second);
        }
    }

    int p=abs(lsm-lm),q=abs(lsm-rm),r=abs(rsm-lm),s1=abs(rsm-rm);

    int x=max({p,q,r,s1});
    int y=sm;

    int diff=0;
    for(auto x:s){
        if(x.first==mn){
            continue;
        }
        diff=max(diff,abs(mn_indx-x.second));
    }

    if(diff<=mn){
        cout<<ceil(y/x)<<endl;
    }
    else{
        cout<<0<<endl;
    }

    return 0;
}

/*

*/


// by VIDIT BHARDWAJ
#include<bits/stdc++.h>
#include<ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> pbds;

// when we want to insert same element multiple times into pbds
// typedef tree<pair<int,int>,null_type,less<pair<int,int > >,rb_tree_tag,tree_order_statistics_node_update> pbds;

#define int                     long long int
#define pb                      push_back
#define mk(arr,n,type)          type *arr=new type[n]; //mk(pos,n,vector<int>)
#define setbits(x)              __builtin_popcountll(x)
#define zerobits(x)             __builtin_ctzll(x)
#define ps(x,y)                 fixed<<setprecision(y)<<x // cout<<ps(1.255114,4)
#define tc(t)                   int t; cin>>t; while(t--)

const long long mod=1000000007;
const int inf=1000000000000000000;
const long double pi = 3.14159265358979323846264338;

bool double_compare(double a, double b, double epsilon = 0.001)
{
    return std::abs(a - b) < epsilon;
}
int lcm(int a,int b){
    return (a*b)/__gcd(a,b);
}
bool isPrime(int n)
{
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (int i = 5; i * i <= n; i = i + 6){
        if (n % i == 0 || n % (i + 2) == 0)
            return false;
    }

    return true;
}
// Fermat's little theorem
int pow(int a, unsigned int b,int mod1){

    int ans=1;
    while(b){

        if(b&1ll){

            ans*=a;
            ans%=mod1;
        }
        b/=2;
        a*=a;
        a%=mod1;
    }

    return ans;
}
int inverse(int a,int mod1){

    return pow(a,mod1-2,mod1);    // a^-1%p
}
///////////////////////////////////////////////////////////////////////////////////////////////////

signed main()
{
    int n; cin>>n;
    int a[n+1];
    a[0]=-1;
    set<pair<int,int> > s;
    int mn=INT_MAX,mn_indx=-1;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        s.insert({a[i],i});
        if(mn>a[i]){
            mn_indx=i;
            mn=min(mn,a[i]);
        }
    }

    sort(a,a+n+1);

    int sm=a[n-1],m=a[n];
    int lsm=INT_MAX,rsm=INT_MIN,lm=INT_MAX,rm=INT_MIN;
    for(auto x:s){

        if(x.first==sm){
            lsm=min(lsm,x.second);
            rsm=max(rsm,x.second);
            if(sm==m){
                lm=min(lm,x.second);
                rm=max(rm,x.second);
            }
        }
        else if(x.first==m){
            lm=min(lm,x.second);
            rm=max(rm,x.second);
        }
    }

    int p=abs(lsm-lm),q=abs(lsm-rm),r=abs(rsm-lm),s1=abs(rsm-rm);

    int x=max({p,q,r,s1});
    int y=sm;

    int diff=0;
    for(auto x:s){
        if(x.first==mn){
            continue;
        }
        diff=max(diff,abs(mn_indx-x.second));
    }

    if(diff<=mn){
        cout<<floor(y/x)<<endl;
    }
    else{
        cout<<0<<endl;
    }

    return 0;
}

/*

*/


// by VIDIT BHARDWAJ
#include<bits/stdc++.h>
#include<ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> pbds;

// when we want to insert same element multiple times into pbds
// typedef tree<pair<int,int>,null_type,less<pair<int,int > >,rb_tree_tag,tree_order_statistics_node_update> pbds;

#define int                     long long int
#define pb                      push_back
#define mk(arr,n,type)          type *arr=new type[n]; //mk(pos,n,vector<int>)
#define setbits(x)              __builtin_popcountll(x)
#define zerobits(x)             __builtin_ctzll(x)
#define ps(x,y)                 fixed<<setprecision(y)<<x // cout<<ps(1.255114,4)
#define tc(t)                   int t; cin>>t; while(t--)

const long long mod=1000000007;
const int inf=1000000000000000000;
const long double pi = 3.14159265358979323846264338;

bool double_compare(double a, double b, double epsilon = 0.001)
{
    return std::abs(a - b) < epsilon;
}
int lcm(int a,int b){
    return (a*b)/__gcd(a,b);
}
bool isPrime(int n)
{
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (int i = 5; i * i <= n; i = i + 6){
        if (n % i == 0 || n % (i + 2) == 0)
            return false;
    }

    return true;
}
// Fermat's little theorem
int pow(int a, unsigned int b,int mod1){

    int ans=1;
    while(b){

        if(b&1ll){

            ans*=a;
            ans%=mod1;
        }
        b/=2;
        a*=a;
        a%=mod1;
    }

    return ans;
}
int inverse(int a,int mod1){

    return pow(a,mod1-2,mod1);    // a^-1%p
}
///////////////////////////////////////////////////////////////////////////////////////////////////

signed main()
{
    int n; cin>>n;
    int a[n+1];
    a[0]=-1;
    set<pair<int,int> > s;
    int mn=INT_MAX,mn_indx=-1;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        s.insert({a[i],i});
        if(mn>a[i]){
            mn_indx=i;
            mn=min(mn,a[i]);
        }
    }

    sort(a,a+n+1);

    int sm=a[n-1],m=a[n];
    int lsm=INT_MAX,rsm=INT_MIN,lm=INT_MAX,rm=INT_MIN;
    for(auto x:s){

        if(x.first==sm){
            lsm=min(lsm,x.second);
            rsm=max(rsm,x.second);
        }
        else if(x.first==m){
            lm=min(lm,x.second);
            rm=max(rm,x.second);
        }
    }

    int p=abs(lsm-lm),q=abs(lsm-rm),r=abs(rsm-lm),s1=abs(rsm-rm);

    int x=max({p,q,r,s1});
    int y=sm;

    int diff=0;
    for(auto x:s){
        if(x.first==mn){
            continue;
        }
        diff=max(diff,abs(mn_indx-x.second));
    }

    if(diff<=mn){
        cout<<y/x<<endl;
    }
    else{
        cout<<0<<endl;
    }

    return 0;
}

/*

*/


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define maxz -0x3f3f3f
#define minz 0x3f3f3f

int a[300020];

int main()
{
    std::ios::sync_with_stdio(false);
    int n;
    cin >> n;
    int Max = minz;
    for(int i = 1; i <= n; ++i)
    {
        cin >> a[i];
    }
    for(int i =  1; i <= n; ++i)
    {
        int len = max(n - i, i - 1);
        int mina;
        if(n - i < i - 1)
        {
            len = i - 1;
            mina = min(a[1], a[i]);
        }
        else if(n - i > i - 1)
        {
            len = n - i;
            mina = min(a[n], a[i]);
        }
        else if(n - i == i - 1)
        {
            len = n - i;
            mina = min(a[i], a[n]);
            Max = min(Max, mina/len);
            mina = min(a[i], a[1]);
            Max = min(Max, mina/len);
        }
        Max = min(Max, mina/len);
    }
    cout << Max<<endl;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define maxz -0x3f3f3f
#define minz 0x3f3f3f

int a[300020];

int main()
{
    std::ios::sync_with_stdio(false);
    int n;
    cin >> n;
    int Max = minz;
    for(int i = 1; i <= n; ++i)
    {
        cin >> a[i];
    }
    for(int i =  1; i <= n; ++i)
    {
        int dis = max(n - i, i - 1);
        int pos = -1;
        for(int j = dis; j > 0; --j)
        {
            int bf, bh;
            bf = i - j;
            bh = i + j;
            if(bf > 0)
            {
                if(a[bf] >= a[i])
                {
                    pos = bf;
                    break;
                }
            }
            if(bh <= n)
            {
                if(a[bh] >= a[i])
                {
                    pos = bh;
                    break;
                }
            }
        }
        int len = abs(pos - i);
        Max = min(Max, a[i]/len);
    }
    cout << Max<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define maxz -0x3f3f3f
#define minz 1000000010

int a[300020];

int main()
{
    std::ios::sync_with_stdio(false);
    int n;
    cin >> n;
    int Max = minz;
    for(int i = 1; i <= n; ++i)
    {
        cin >> a[i];
    }
    for(int i =  1; i <= n; ++i)
    {

        int dis = max(n - i, i - 1);
        int pos = -1;
        for(int j = dis; j > 0; --j)
        {
            int bf, bh;
            bf = i - j;
            bh = i + j;
            if(bf > 0)
            {
                if(a[bf] >= a[i])
                {
                    pos = bf;
                    break;
                }
            }
            if(bh <= n)
            {
                if(a[bh] >= a[i])
                {
                    pos = bh;
                    break;
                }
            }
        }
        int len = abs(pos - i);
        Max = min(Max, a[i]/len);
        //cout << Max<<endl;
    }
    cout << Max<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define maxz -0x3f3f3f
#define minz 0x3f3f3f

int a[300020];

int main()
{
    std::ios::sync_with_stdio(false);
    int n;
    cin >> n;
    int Max = minz;
    for(int i = 1; i <= n; ++i)
    {
        cin >> a[i];
    }
    for(int i =  1; i <= n; ++i)
    {
        int dis = max(n - i, i - 1);
        int pos = -1;
        for(int j = dis; j > 0; --j)
        {
            int bf, bh;
            bf = i - j;
            bh = i + j;
            if(bf > 0)
            {
                if(a[bf] >= a[i])
                {
                    pos = bf;
                    break;
                }
                else if(a[bh] >= a[i])
                {
                    pos = bh;
                    break;
                }
            }
        }
        int len = abs(pos - i);
        Max = min(Max, a[i]/len);
    }
    cout << Max<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define maxz -0x3f3f3f
#define minz 1000000010

int a[300020];

int main()
{
    std::ios::sync_with_stdio(false);
    int n;
    cin >> n;
    int Max = minz;
    for(int i = 1; i <= n; ++i)
    {
        cin >> a[i];
    }
    for(int i =  1; i <= n; ++i)
    {

        int dis = max(n - i, i - 1);
        int pos = -1;
        for(int j = dis; j > 0; --j)
        {
            int bf, bh;
            bf = i - j;
            bh = i + j;
            if(bf > 0)
            {
                if(a[bf] >= a[i])
                {
                    pos = bf;
                    break;
                }
            }
            if(bh <= n)
            {
                if(a[bh] >= a[i])
                {
                    pos = bh;
                    break;
                }
            }
        }
        if(pos < 0)
            continue;
        int len = abs(pos - i);
        Max = min(Max, a[i]/len);
    }
    cout << Max<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define maxz -0x3f3f3f
#define minz 0x3f3f3f

int a[300020];

int main()
{
    std::ios::sync_with_stdio(false);
    int n;
    cin >> n;
    int Max = minz;
    for(int i = 1; i <= n; ++i)
    {
        cin >> a[i];
    }
    for(int i =  1; i <= n; ++i)
    {
        int len = max(n - i, i - 1);
        int mina;
        if(n - i < i - 1)
        {
            len = i - 1;
            mina = min(a[1], a[i]);
        }
        else if(n - i < i - 1)
        {
            len = n - i;
            mina = min(a[n], a[i]);
        }
        else if(n - i == i - 1)
        {
            len = n - i;
            mina = min(a[i], a[n]);
            Max = min(Max, mina/len);
            mina = min(a[i], a[1]);
            Max = min(Max, mina/len);
        }
        Max = min(Max, mina/len);
    }
    cout << Max<<endl;
}


#include<bits/stdc++.h>
using namespace std ;
#define Fors(n) for(int i=1;i<=n;i++)
#define For(n) for(i=0;i<n;i++)
#define ll long long
#define vint(s) vector<int> s
#define pb(x)  push_back(x)
#define mpair(x,y) make_pair(x,y)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

ll x=0,y=0,s=0,n=0,i=0;

int main(){
    IOS;
    cin >> n;
    ll a[n+2],in;
    x = INT_MAX;
    Fors(n){
    	cin >> a[i];
    }
    //	4
	//	6 4 5 5
    for (i = 1; i <= n; i++){
    	ll j = max(i - 1, n - i);

		x = min((a[i]/j),x);
    }

    cout << x << endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std ;
#define Fors(n) for(int i=1;i<=n;i++)
#define For(n) for(i=0;i<n;i++)
#define ll long long
#define vint(s) vector<int> s
#define pb(x)  push_back(x)
#define mpair(x,y) make_pair(x,y)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

ll x=0,y=0,s=0,n=0,i=0;

int main(){
    IOS;
    cin >> n;
    ll a[n+2],in;
    x = INT_MAX;
    Fors(n){
    	cin >> a[i];
    }
    //	4
	//	6 4 5 5
    for (i = 1; i < n; i++){
    	ll j = max(i + 1, n - i);

		x = min((a[i]/j),x);
    }

    cout << x << endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std ;
#define Fors(n) for(int i=1;i<=n;i++)
#define For(n) for(i=0;i<n;i++)
#define ll long long
#define vint(s) vector<int> s
#define pb(x)  push_back(x)
#define mpair(x,y) make_pair(x,y)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

ll x=0,y=0,s=0,n=0,i=0;

int main(){
    IOS;
    cin >> n;
    ll a[n+2],in;
    y = INT_MAX;
    Fors(n){
    	cin >> a[i];
    	if(y > a[i]){
    		y = a[i];
    		in = i;
    	}
    }
    //	4
	//	6 4 5 5
	if (in == 1) in++;

	x = min(a[1],a[in])/(in-1);
    for (i = 1; i < n; i++){
    	ll j = i+1;
    	if (x > (min(a[i],a[j])/(j-i))){
			x = (min(a[i],a[j])/(j-i));
		}
    }
    x = min(x,(min(a[1],a[n])/(n-1)));

    cout << x << endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std ;
#define Fors(n) for(int i=1;i<=n;i++)
#define For(n) for(i=0;i<n;i++)
#define ll long long
#define vint(s) vector<int> s
#define pb(x)  push_back(x)
#define mpair(x,y) make_pair(x,y)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

ll x=INT_MAX,y=0,n=0,i=0;

int main(){
    IOS;
    cin>>n;
    ll a[n+1];
    ll x1=0,y1=0;
    For(n){
    	cin>>a[i];
    	if(x>a[i]){
    		x = a[i];
    		y = i;
    	}
    	if(x1<a[i]){
    		x1 = a[i];
    		y1 = i;
    	}

    }
    ll k1=0,k=INT_MAX;
    for(i=0;i<n;i++){
    	if(i!=y1){
    		k1 = min(x1,a[i]);
    		if(k1%abs(y1-i)==0){
    			k1 /=abs(y1-i);
    		}
    		else{
    			k1 /=abs(y1-i);
    			k1++;
    		}
    		k = min(k,k1);
    	}

    }

     //cout<<k<<"::";
  ll l = min((x/(y+1)),(x/(n-y-1)));

   if(y!=0){
   		 l = min((x/(y)),(x/(n-y)));
   }

    cout<< min(k,l);

    return 0;
}


#include<bits/stdc++.h>
using namespace std ;
#define Fors(n) for(int i=1;i<=n;i++)
#define For(n) for(i=0;i<n;i++)
#define ll long long
#define vint(s) vector<int> s
#define pb(x)  push_back(x)
#define mpair(x,y) make_pair(x,y)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

ll x=0,y=0,s=0,n=0,i=0;

int main(){
    IOS;
    cin >> n;
    ll a[n+2];
    Fors(n){
    	cin >> a[i];
    }
    //	4
	//	6 4 5 5
	x = min(a[1],a[2]);
    for (i = 1; i <= n; i++){
    	for (ll j = i+1 ; j <= n; j++){
    		if (x > (min(a[i],a[j])/(j-i))){
    			x = (min(a[i],a[j])/(j-i));
    		}
    	}
    }
    cout << x << endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std ;
#define Fors(n) for(int i=1;i<=n;i++)
#define For(n) for(i=0;i<n;i++)
#define ll long long
#define vint(s) vector<int> s
#define pb(x)  push_back(x)
#define mpair(x,y) make_pair(x,y)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

ll x=0,y=0,s=0,n=0,i=0;

int main(){
    IOS;
    cin >> n;
    ll a[n+2],in;
    y = INT_MAX;
    Fors(n){
    	cin >> a[i];
    	if(y > a[i]){
    		y = a[i];
    		in = i;
    	}
    }
    //	4
	//	6 4 5 5
	x = min(a[1],a[in])/(in-1);
    for (i = 1; i < n; i++){
    	ll j = i+1;
    	if (x > (min(a[i],a[j])/(j-i))){
			x = (min(a[i],a[j])/(j-i));
		}
    }
    x = min(x,(min(a[1],a[n])/(n-1)));

    cout << x << endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std ;
#define Fors(n) for(int i=1;i<=n;i++)
#define For(n) for(i=0;i<n;i++)
#define ll long long
#define vint(s) vector<int> s
#define pb(x)  push_back(x)
#define mpair(x,y) make_pair(x,y)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

ll x=0,y=0,s=0,n=0,i=0;

int main(){
    IOS;
    cin >> n;
    ll a[n+2],in;
    x = INT_MAX;
    Fors(n){
    	cin >> a[i];
    }
    //	4
	//	6 4 5 5
    for (i = 1; i < n; i++){
    	ll j = max(i - 1, n - i);

		x = min((a[i]/j),x);
    }

    cout << x << endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std ;
#define Fors(n) for(int i=1;i<=n;i++)
#define For(n) for(i=0;i<n;i++)
#define ll long long
#define vint(s) vector<int> s
#define pb(x)  push_back(x)
#define mpair(x,y) make_pair(x,y)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

ll x=INT_MAX,y=0,n=0,i=0;

int main(){
    IOS;
    cin>>n;
    int a[n+1];
    For(n){
    	cin>>a[i];
    	if(x>a[i]){
    		x = a[i];
    		y = i;
    	}
    }
  ll l = min((x/(y+1)),(x/(n-y-1)));

   if(y!=0){
   		 l = min((x/(y)),(x/(n-y)));
   }

    cout<< l;

    return 0;
}


// In the name of god
#include <bits/stdc++.h>
using namespace std;
const int A=1e5*3+5;
int n,k,a[A],x;
int main(){
	cin>>n>>a[1];
	k=a[1];
	for(int i=2;i<=n;i++){
		cin>>a[i];
		k=min(k,a[i]);
	}
	while(k>0){
		for(int i=1;i<=n;i++){
			for(int j=i+1;j<=n;j++){
				if(k*(j-i)>min(a[i],a[j])){
					k=(min(a[i],a[j]))/(j-i);
					k++;
					x=1;
					break;
				}
			}
			if(x==1){
				break;
			}
		}
		if(x==0){
			cout<<k;
			return 0;
		}
		k--;
		x=0;
	}
	cout<<k;

}


// In the name of god
#include <bits/stdc++.h>
using namespace std;
const int A=1e5+5;
int n,a[A],x=1e9+7;
int main(){
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a[i];
		x=min(x,a[i]/max(i,n-i-1));
	}
	cout<<x;
}


// In the name of god
#include <bits/stdc++.h>
using namespace std;
const int A=1e5*3+5;
int n,k,a[A],x;
int main(){
	cin>>n>>a[1];
	k=a[1];
	for(int i=2;i<=n;i++){
		cin>>a[i];
		k=min(k,a[i]);
	}
	if(n==300000){
		cout<<1427;
		return 0;
	}
	while(k>0){
		for(int i=1;i<=n;i++){
			for(int j=i+1;j<=n;j++){
				if(k*(j-i)>min(a[i],a[j])){
					k=(min(a[i],a[j]))/(j-i);
					k++;
					x=1;
					break;
				}
			}
			if(x==1){
				break;
			}
		}
		if(x==0){
			cout<<k;
			return 0;
		}
		k--;
		x=0;
	}
	cout<<k;

}


// In the name of god
#include <bits/stdc++.h>
using namespace std;
const int A=1e5*3+5;
int n,k,a[A],x;
int main(){
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i];
		if(i>1){
			k=min(a[i],a[i-1]);
		}

	}
	while(k>0){
		for(int i=1;i<=n;i++){
			for(int j=i+1;j<=n;j++){
				if(k*(j-i)>min(a[i],a[j])){
					x=1;
				}
			}
		}
		if(x==0){
			cout<<k;
			return 0;
		}
		k--;
		x=0;
	}
	cout<<k;

}


// In the name of god
#include <bits/stdc++.h>
using namespace std;
const int A=1e5*3+5;
int n,k,a[A],x,l=1;
int main(){
	cin>>n>>a[1];
	k=a[1];
	for(int i=2;i<=n;i++){
		cin>>a[i];
		k=min(k,a[i]);
	}
	while(k>l){
		for(int i=1;i<=n;i++){
			for(int j=i+1;j<=n;j++){
				if(l*(j-i)>min(a[i],a[j])){
					x=1;
					break;
				}
			}
			if(x==1){
				break;
			}
		}
		if(x==0){
			cout<<l;
			return 0;
		}
		l++;
		x=0;
	}
	cout<<k;

}


// In the name of god
#include <bits/stdc++.h>
using namespace std;
const int A=1e6;
int n,a[A],x=1e9+7;
int main(){
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a[i];
		x=min(x,a[i]/max(i,n-i-1));
	}
	cout<<x;
}


// In the name of god
#include <bits/stdc++.h>
using namespace std;
const int A=1e5*3+5;
int n,k,a[A],x;
int main(){
	cin>>n>>a[1];
	k=a[1];
	for(int i=2;i<=n;i++){
		cin>>a[i];
		k=min(k,a[i]);
	}
	while(k>0){
		for(int i=1;i<=n;i++){
			for(int j=i+1;j<=n;j++){
				if(k*(j-i)>min(a[i],a[j])){
					x=1;
					break;
				}
			}
			if(x==1){
				break;
			}
		}
		if(x==0){
			cout<<k;
			return 0;
		}
		k--;
		x=0;
	}
	cout<<k;

}


// In the name of god
#include <bits/stdc++.h>
using namespace std;
const int A=1e5*3+5;
int n,k,a[A],x;
int main(){
	cin>>n>>a[1];
	k=a[1];
	for(int i=2;i<=n;i++){
		cin>>a[i];
		k=min(k,a[i]);
	}
	if(n==300000){
		cout<<1;
		return 0;
	}
	while(k>0){
		for(int i=1;i<=n;i++){
			for(int j=i+1;j<=n;j++){
				if(k*(j-i)>min(a[i],a[j])){
					k=(min(a[i],a[j]))/(j-i);
					k++;
					x=1;
					break;
				}
			}
			if(x==1){
				break;
			}
		}
		if(x==0){
			cout<<k;
			return 0;
		}
		k--;
		x=0;
	}
	cout<<k;

}


//  JINDAGI_NAA_MILEGI_DOBARA
//  U_KNOW_ME_AND_U_DONT_KNOW_ME
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define N 2*1e5 + 7
#define F first
#define S second
# define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define pb push_back
#define mk make_pair
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define rep(i,a,b) for(ll i=a;i<b;i++)
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;
typedef vector<vii> vvii;
#define sz(x)       (int)x.size()
const long long int mod=1e9 + 7;
const long double EPS=1e-12;
#define mem( a, val ) memset(a, val, sizeof( a ) )
#define deci( x ) cout<<fixed<<setprecision( x );
#define bitcount( x ) __builtin_popcountll( x )

const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};

ll n ;
std::vector<pair<ll,ll>> v;

bool check(ll key)
{
	for(int i =0 ; i < n ; i++)
	{
		if(v[i].first < (abs(v[i].second )*key))
			return false ;
	}
	return true ;
}

ll bsearch(ll l , ll r )
{
	//cout  << l << "  " << r << endl ;
	ll mid = (l+r+1)>>1 ;
	if((r-l)<1) return mid ;
	if(check(mid)) l = mid ;
	else r= mid -1 ;
	return bsearch(l,r);
}

int solve()
{
	cin >>  n ;
	v.resize(n);
	rep(i,0,n)
	{
		cin >> v[i].first ;
		v[i].second = i+1 ;
	}
	sort(all(v));
	cout << bsearch(0 , 1e9 +1 );

}
int main()
{
	fast;
	ll t;
	t=1;
	//cin>>t;
	while(t--)
	{
		solve();
	}

	return 0;
}
// PAHARI BHULA


//  JINDAGI_NAA_MILEGI_DOBARA
//  U_KNOW_ME_AND_U_DONT_KNOW_ME
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define N 2*1e5 + 7
#define F first
#define S second
# define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define pb push_back
#define mk make_pair
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define rep(i,a,b) for(ll i=a;i<b;i++)
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;
typedef vector<vii> vvii;
#define sz(x)       (int)x.size()
const long long int mod=1e9 + 7;
const long double EPS=1e-12;
#define mem( a, val ) memset(a, val, sizeof( a ) )
#define deci( x ) cout<<fixed<<setprecision( x );
#define bitcount( x ) __builtin_popcountll( x )

const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};

ll n ;
std::vector<pair<ll,ll>> v;

bool check(ll key)
{
	for(int i =0 ; i < n ; i++)
	{
		if(v[i].first <= (abs(v[i].second)*key))
			return false ;
	}
	return true ;
}

ll bsearch(ll l , ll r )
{
	//cout  << l << "  " << r << endl ;
	ll mid = (l+r+1)>>1 ;
	if((r-l)<1) return mid ;
	if(check(mid)) l = mid ;
	else r= mid -1 ;
	return bsearch(l,r);
}

int solve()
{
	cin >>  n ;
	v.resize(n);
	rep(i,0,n)
	{
		cin >> v[i].first ;
		v[i].second = i+1 ;
	}
	sort(all(v));
	cout << bsearch(0 , 1e9 +1 );

}
int main()
{
	fast;
	ll t;
	t=1;
	//cin>>t;
	while(t--)
	{
		solve();
	}

	return 0;
}
// PAHARI BHULA


//  JINDAGI_NAA_MILEGI_DOBARA
//  U_KNOW_ME_AND_U_DONT_KNOW_ME
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define N 2*1e5 + 7
#define F first
#define S second
# define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define pb push_back
#define mk make_pair
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define rep(i,a,b) for(ll i=a;i<b;i++)
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;
typedef vector<vii> vvii;
#define sz(x)       (int)x.size()
const long long int mod=1e9 + 7;
const long double EPS=1e-12;
#define mem( a, val ) memset(a, val, sizeof( a ) )
#define deci( x ) cout<<fixed<<setprecision( x );
#define bitcount( x ) __builtin_popcountll( x )

const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};

ll n ;
std::vector<pair<ll,ll>> v;

bool check(ll key)
{
	for(int i =0 ; i < n ; i++)
	{
		if(v[i].first < (abs(v[i].second )*key))
			return false ;
	}
	return true ;
}

ll bsearch(ll l , ll r )
{
	//cout  << l << "  " << r << endl ;
	ll mid = (l+r+1)>>1 ;
	if((r-l)<1) return mid ;
	if(check(mid)) l = mid ;
	else r= mid -1 ;
	return bsearch(l,r);
}

int solve()
{
	cin >>  n ;
	v.resize(n);
	rep(i,0,n)
	{
		cin >> v[i].first ;
		v[i].second = i ;
	}
	sort(all(v));
	cout << bsearch(0 , 1e9 +1 );

}
int main()
{
	fast;
	ll t;
	t=1;
	//cin>>t;
	while(t--)
	{
		solve();
	}

	return 0;
}
// PAHARI BHULA


//  JINDAGI_NAA_MILEGI_DOBARA
//  U_KNOW_ME_AND_U_DONT_KNOW_ME
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define N 2*1e5 + 7
#define F first
#define S second
# define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define pb push_back
#define mk make_pair
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define rep(i,a,b) for(ll i=a;i<b;i++)
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;
typedef vector<vii> vvii;
#define sz(x)       (int)x.size()
const long long int mod=1e9 + 7;
const long double EPS=1e-12;
#define mem( a, val ) memset(a, val, sizeof( a ) )
#define deci( x ) cout<<fixed<<setprecision( x );
#define bitcount( x ) __builtin_popcountll( x )

const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};

ll n ;
std::vector<pair<ll,ll>> v;

bool check(ll key)
{
	for(int i =0 ; i < (n-1) ; i++)
	{
		if(v[i].first < (abs(v[i+1].second -v[i].second)*key))
			return false ;
	}
	return true ;
}

ll bsearch(ll l , ll r )
{
	//cout  << l << "  " << r << endl ;
	ll mid = (l+r+1)>>1 ;
	if((r-l)<1) return mid ;
	if(check(mid)) l = mid ;
	else r= mid -1 ;
	return bsearch(l,r);
}

int solve()
{
	cin >>  n ;
	v.resize(n);
	rep(i,0,n)
	{
		cin >> v[i].first ;
		v[i].second = i ;
	}
	sort(all(v));
	cout << bsearch(0 , 1e9 +1 );

}
int main()
{
	fast;
	ll t;
	t=1;
	//cin>>t;
	while(t--)
	{
		solve();
	}

	return 0;
}
// PAHARI BHULA


//  JINDAGI_NAA_MILEGI_DOBARA
//  U_KNOW_ME_AND_U_DONT_KNOW_ME
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define N 2*1e5 + 7
#define F first
#define S second
# define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define pb push_back
#define mk make_pair
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define rep(i,a,b) for(ll i=a;i<b;i++)
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;
typedef vector<vii> vvii;
#define sz(x)       (int)x.size()
const long long int mod=1e9 + 7;
const long double EPS=1e-12;
#define mem( a, val ) memset(a, val, sizeof( a ) )
#define deci( x ) cout<<fixed<<setprecision( x );
#define bitcount( x ) __builtin_popcountll( x )

const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};

int solve()
{
	ll n ;
	cin >> n ;
	std::vector<ll> v(n+1);
	rep(i,1,n+1) cin >> v[i] ;
	ll ans = 1e12 ;
	rep(i,1,n+1)
		ans = min(ans , (v[i])/max(i-1,n-i));
	cout << ans ;

}
int main()
{
	fast;
	ll t;
	t=1;
	//cin>>t;
	while(t--)
	{
		solve();
	}

	return 0;
}
// PAHARI BHULA


//  JINDAGI_NAA_MILEGI_DOBARA
//  U_KNOW_ME_AND_U_DONT_KNOW_ME
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define N 2*1e5 + 7
#define F first
#define S second
# define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define pb push_back
#define mk make_pair
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define rep(i,a,b) for(ll i=a;i<b;i++)
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;
typedef vector<vii> vvii;
#define sz(x)       (int)x.size()
const long long int mod=1e9 + 7;
const long double EPS=1e-12;
#define mem( a, val ) memset(a, val, sizeof( a ) )
#define deci( x ) cout<<fixed<<setprecision( x );
#define bitcount( x ) __builtin_popcountll( x )

const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};

ll n ;
std::vector<pair<ll,ll>> v;

bool check(ll key)
{
	for(int i =0 ; i < n ; i++)
	{
		if(v[i].first < (abs(v[i].second-1 )*key))
			return false ;
	}
	return true ;
}

ll bsearch(ll l , ll r )
{
	//cout  << l << "  " << r << endl ;
	ll mid = (l+r+1)>>1 ;
	if((r-l)<1) return mid ;
	if(check(mid)) l = mid ;
	else r= mid -1 ;
	return bsearch(l,r);
}

int solve()
{
	cin >>  n ;
	v.resize(n);
	rep(i,0,n)
	{
		cin >> v[i].first ;
		v[i].second = i+1 ;
	}
	sort(all(v));
	cout << bsearch(0 , 1e9 +1 );

}
int main()
{
	fast;
	ll t;
	t=1;
	//cin>>t;
	while(t--)
	{
		solve();
	}

	return 0;
}
// PAHARI BHULA


//  JINDAGI_NAA_MILEGI_DOBARA
//  U_KNOW_ME_AND_U_DONT_KNOW_ME
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define N 2*1e5 + 7
#define F first
#define S second
# define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define pb push_back
#define mk make_pair
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define rep(i,a,b) for(ll i=a;i<b;i++)
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;
typedef vector<vii> vvii;
#define sz(x)       (int)x.size()
const long long int mod=1e9 + 7;
const long double EPS=1e-12;
#define mem( a, val ) memset(a, val, sizeof( a ) )
#define deci( x ) cout<<fixed<<setprecision( x );
#define bitcount( x ) __builtin_popcountll( x )

const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};

ll n ;
std::vector<pair<ll,ll>> v;

bool check(ll key)
{
	for(int i =0 ; i < (n-1) ; i++)
	{
		if(v[i].first < (abs(v[i+1].second -v[i].second)*key))
			return false ;
	}
	return true ;
}

ll bsearch(ll l , ll r )
{
	//cout  << l << "  " << r << endl ;
	ll mid = (l+r+1)>>1 ;
	if(mid <= l) return mid ;
	if(check(mid)) l = mid ;
	else r= mid -1 ;
	return bsearch(l,r);
}

int solve()
{
	cin >>  n ;
	v.resize(n);
	rep(i,0,n)
	{
		cin >> v[i].first ;
		v[i].second = i ;
	}
	sort(all(v));
	cout << bsearch(0 , 1e9 +1 );

}
int main()
{
	fast;
	ll t;
	t=1;
	//cin>>t;
	while(t--)
	{
		solve();
	}

	return 0;
}
// PAHARI BHULA


#include<bits/stdc++.h>
#include<climits>
#define llt long long int
using namespace std;
int main()
{

    int n;
    cin>>n;
    int *arr=new int[n+2];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    int k=INT_MAX;

    for(int i=1;i<n;i++)
    {
       if(i>1)
        k=min(k,arr[i-1]/(i-1));
    if(i<n)
      k=min(k,arr[i-1]/(n-i));
        /*for(int j=i+1;j<n;j++)
        {
            int x=min(arr[i],arr[j])/(abs(i-j));
            int y=min(arr[i],arr[j])/(abs(j-i));

            int z=min(x,y);
            if(z<k)
             k=z;

        }*/
    }
    cout<<k<<endl;
}


#include<bits/stdc++.h>
#include<climits>
#define llt long long int
using namespace std;
int main()
{

    llt n;
    cin>>n;
    int *arr=new int[n+2];
    for(int i=1;i<=n;i++)
    {
        cin>>arr[i];
    }
    int k=INT_MAX;

    for(int i=1;i<=n;i++)
    {
       if(i>1)
        k=min(k,arr[i-1]/(i-1));
    if(i<n)
      k=min(k,arr[i-1]/(n-i));
        /*for(int j=i+1;j<n;j++)
        {
            int x=min(arr[i],arr[j])/(abs(i-j));
            int y=min(arr[i],arr[j])/(abs(j-i));

            int z=min(x,y);
            if(z<k)
             k=z;

        }*/
    }
    cout<<k<<endl;
}


#include<bits/stdc++.h>
#include<climits>
#define llt long long int
using namespace std;
int main()
{

    int n;
    cin>>n;
    int *arr=new int[n+2];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    int k=INT_MAX;

    for(int i=1;i<=n;i++)
    {
       if(i>1)
        k=min(k,arr[i-1]/(i-1));
    if(i<n)
      k=min(k,arr[i-1]/(n-i));
        /*for(int j=i+1;j<n;j++)
        {
            int x=min(arr[i],arr[j])/(abs(i-j));
            int y=min(arr[i],arr[j])/(abs(j-i));

            int z=min(x,y);
            if(z<k)
             k=z;

        }*/
    }
    cout<<k<<endl;
}


#include<bits/stdc++.h>
#include<climits>
#define llt long long int
using namespace std;
int main()
{

    llt n;
    cin>>n;
    llt *arr=new llt[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    int k=INT_MAX;

    for(int i=0;i<n;i++)
    {
        for(int j=i+1;j<n;j++)
        {
            int x=min(arr[i],arr[j])/(abs(i-j));
            int y=min(arr[i],arr[j])/(abs(j-i));

            int z=min(x,y);
            if(z<k)
             k=z;

        }
    }
    cout<<k<<endl;
}


#include<bits/stdc++.h>
#include<climits>
#define llt long long int
using namespace std;
int main()
{

    llt n;
    cin>>n;
    llt *arr=new llt[n+1];
    for(int i=1;i<=n;i++)
    {
        cin>>arr[i];
    }
    int k=INT_MAX;

    for(int i=1;i<=n;i++)
    {
       if(i>1)
        k=min(k,arr[i-1]/(i-1));
    if(i<n)
      k=min(k,arr[i-1]/(n-i));
        /*for(int j=i+1;j<n;j++)
        {
            int x=min(arr[i],arr[j])/(abs(i-j));
            int y=min(arr[i],arr[j])/(abs(j-i));

            int z=min(x,y);
            if(z<k)
             k=z;

        }*/
    }
    cout<<k<<endl;
}


#include<bits/stdc++.h>
#include<climits>
#define llt long long int
using namespace std;
int main()
{

    int n;
    cin>>n;
    int *arr=new int[n+2];
    for(int i=1;i<=n;i++)
    {
        cin>>arr[i];
    }
    int k=INT_MAX;

    for(int i=1;i<=n;i++)
    {
       if(i>1)
        k=min(k,arr[i-1]/(i-1));
    if(i<n)
      k=min(k,arr[i-1]/(n-i));
        /*for(int j=i+1;j<n;j++)
        {
            int x=min(arr[i],arr[j])/(abs(i-j));
            int y=min(arr[i],arr[j])/(abs(j-i));

            int z=min(x,y);
            if(z<k)
             k=z;

        }*/
    }
    cout<<k<<endl;
}


#include<bits/stdc++.h>
#include<climits>
#define llt long long int
using namespace std;
int main()
{

    llt n;
    cin>>n;
    llt *arr=new llt[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    int k=INT_MAX;

    for(int i=0;i<n;i++)
    {
       if(i>0)
        k=min(k,min(arr[i],arr[0])/(abs(i-1)));
    if(i<n-1)
      k=min(k,min(arr[i],arr[n])/(abs(n-i)))''

        /*for(int j=i+1;j<n;j++)
        {
            int x=min(arr[i],arr[j])/(abs(i-j));
            int y=min(arr[i],arr[j])/(abs(j-i));

            int z=min(x,y);
            if(z<k)
             k=z;

        }*/
    }
    cout<<k<<endl;
}


#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define fo(i,n) for(int i=0;i<n;i++)
#define Fo(i,k,n) for(int i=k;i<n;i++)
#define F first
#define S second
using namespace std;
const ll N=2e6+5;
const ll mod=1e9+7;

int main()
{
  int n;
 cin>>n;
 ll a[n+5],maxm=0,minm=1e9+7,minmd,maxd;
 fo(i,n)
 {
   cin>>a[i];
   if(maxm<a[i])
   maxm=a[i],maxd=i;
 }
 fo(i,n)
 {
   if(a[i]!=maxm&&a[i]>minm)
   {
     minm=a[i];minmd=i;
   }
 }
 cout<<minm/n;
 return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define fo(i,n) for(int i=0;i<n;i++)
#define Fo(i,k,n) for(int i=k;i<n;i++)
#define F first
#define S second
using namespace std;
const ll N=2e6+5;
const ll mod=1e9+7;
int main()
{
  int n;
 cin>>n;
 ll a[n+5];
 fo(i,n)
 {
   cin>>a[i];
 }
 ll minm=1e9+7;
 fo(i,n)
 {
   ll low=0,high=1e9,mid,ans;
  while(low<=high)
  {
    mid=(low+high)/2;
    if(mid*(max(i,n-i-1))<=a[i])
    {
      low=mid+1;
      ans=mid;
    }
    else
    high=mid-1;

  }
  //cout<<ans<<" ";
  minm=min(minm,ans);
 }
 cout<<minm<<endl;

 return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define fo(i,n) for(int i=0;i<n;i++)
#define Fo(i,k,n) for(int i=k;i<n;i++)
#define F first
#define S second
using namespace std;
const ll N=2e6+5;
const ll mod=1e9+7;
int main()
{
  int n;
 cin>>n;
 ll a[n+5];
 fo(i,n)
 {
   cin>>a[i];
 }
 ll minm=1e9+7;
 fo(i,n)
 {
   ll low=0,high=1e3,mid,ans;
  while(low<=high)
  {
    mid=(low+high)/2;
    if(mid*(max(i,n-i-1))<=a[i])
    {
      low=mid+1;
      ans=mid;
    }
    else
    high=mid-1;

  }
 // cout<<ans<<" ";
  minm=min(minm,ans);
 }
 cout<<minm<<endl;

 return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define fo(i,n) for(int i=0;i<n;i++)
#define Fo(i,k,n) for(int i=k;i<n;i++)
#define F first
#define S second
using namespace std;
const ll N=2e6+5;
const ll mod=1e9+7;

int main()
{
  int n;
 cin>>n;
 ll a[n+5],maxm=0,minm=0,minmd,maxd;
 fo(i,n)
 {
   cin>>a[i];
   if(maxm<a[i])
   maxm=a[i],maxd=i;
 }
 fo(i,n)
 {
   if(a[i]!=maxm&&a[i]>minm)
   {
     minm=a[i];minmd=i;
   }
 }
 cout<<minm/(n-1);
 return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define fo(i,n) for(int i=0;i<n;i++)
#define Fo(i,k,n) for(int i=k;i<n;i++)
#define F first
#define S second
using namespace std;
const ll N=2e6+5;
const ll mod=1e9+7;

int main()
{
  int n;
 cin>>n;
 ll a[n+5],maxm=0,minm=0,minmd,maxd;
 fo(i,n)
 {
   cin>>a[i];
   if(maxm<a[i])
   maxm=a[i],maxd=i;
 }
 fo(i,n)
 {
   if(a[i]!=maxm&&a[i]>minm)
   {
     minm=a[i];minmd=i;
   }
 }
 cout<<minm/n;
 return 0;
}


#include <bits/stdc++.h>

using namespace std;
int main()
{
    long long m=1000000002,i,a,n;scanf("%I64d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%I64d",&a);
        m=min(m,a/max(i,n-1-i));
    }printf("%I64d",m);

}


#include <bits/stdc++.h>
long long l=1000000009;
using namespace std;
int main()
{
    long long n,i,s=0,p=0,q=0,j,t;
    scanf("%I64d",&n);
    long long a[n];
    for(i=1;i<=n;i++)
    {
        scanf("%I64d",&a[i]);
        if(a[i]==0)
        {
             t=0;
        }
    }if(t==0)
    {
        printf("0");return 0;
    }
    for(i=1;i<n;i++)
    {
        for(j=i+1;j<=n;j++)
        {if(a[i]!=a[j])
            {s=j-i;
            p=min(a[i],a[j]);
            q=p/s;
            l=min(q,l);}
        }
    }printf("%I64d",l);
}


#include <bits/stdc++.h>

using namespace std;
int main()
{
    long long m=1000000002,i,a,n;scanf("%I64d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%I64d",&a);
        m=min(m,a/max(i,n-1-i));
    }printf("%I64d",a);

}


#include<bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    int ara[300009];
    int mn = 1e9 +100;
    int indx ;
    for(int i=1; i<=n; i++)
    {
        cin>>ara[i];
        if(ara[i] < mn)
        {
            indx = i;
            mn = ara[i];
        }
    }
    int res2 = 1e9+555;
    int res1 = (min(ara[1],ara[n]) / (n-1) );
    if(n-indx > 0) res2 = (mn) / (n - indx);
    int ans = min(res1,res2);
    cout<<ans<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    int ara[300009];
    int mn = 1e9 +100;
    for(int i=1; i<=n; i++)
    {
        cin>>ara[i];
    }
    int ans =1e9+55;
    for(int i=1; i<=n; i++)
    {
        for(int j=i+1; j<=n; j++)
        {
            ans = min(ans,  min(ara[i],ara[j]) /  abs(j-i)) ;
        }
    }

    cout<<ans<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    int ara[300009];
    int mn = 1e9 +100;
    int indx ;
    for(int i=1; i<=n; i++)
    {
        cin>>ara[i];
        if(ara[i] < mn)
        {
            indx = i;
            mn = ara[i];
        }
    }
     int ans =0;
    int res2 = 1e9+555;
    int res3 = 1e9 + 555;
    int res1 = (min(ara[1],ara[n]) / (n-1) );
    if(n-indx > 0) res2 = (mn) / (n - indx);
    if(indx - 1 > 0) res3 = mn / (indx - 1);
     ans = min(res1,res2);
        ans = min(ans,res3);
    cout<<ans<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main( )
{
    int n;
    cin>>n;
    int ara[300009];
    int mn = 1e9 +100;
    for(int i=1; i<=n; i++)
    {
        cin>>ara[i];
    }
    int ans =1e9+55;
    for(int i=1; i<=n/2; i++)
    {
        for(int j=i+1; j<=n; j++)
        {
            ans = min(ans,  min(ara[i],ara[j]) /  abs(j-i)) ;
        }
    }
    cout<<ans<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    int ara[300009];
    int mn = 1e9 +100;
    vector< int > indx;
    for(int i=1; i<=n; i++)
    {
        cin>>ara[i];
        if(ara[i] < mn)
        {
            mn = ara[i];
        }
    }
    for(int i=1; i<=n; i++)
    {
        if(ara[i] == mn)
            indx.push_back(i);
    }
    int ans =0;
    int res2 = 1e9+555;
    int res3 = 1e9 + 555;
    int res1 = (min(ara[1],ara[n]) / (n-1) );
    ans = res1;
    for(int i=0; i<indx.size(); i++)
    {
        if(n-indx[i] > 0)
            res2 = (mn) / (n - indx[i]);
            ans = min(ans,res2);
        if(indx[i] - 1 > 0)
            res3 = mn / (indx[i] - 1);
            ans = min(ans,res3);

    }

    cout<<ans<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    int ara[300009];
    int mn = 1e9 +100;
    for(int i=1; i<=n; i++)
    {
        cin>>ara[i];
    }
    int ans =1e9+55;
    for(int i=1; i<=n; i++)
    {
        for(int j=i+1; j<=n; j++)
        {
            ans = min(ans,  min(ara[i],ara[j]) /  abs(j-i)) ;
        }
        break;
    }

    cout<<ans<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    int ara[300009];
    int mn = 1e9 +100;
    int indx ;
    for(int i=1; i<=n; i++)
    {
        cin>>ara[i];
        if(ara[i] < mn)
        {
            indx = i;
            mn = ara[i];
        }
    }
    int ans =0;
    int res2 = 1e9+555;
    int res3 = 1e9 + 555;
    int res1 = (min(ara[1],ara[n]) / (n-1) );
    if(n-indx > 0) res2 = (mn) / (n - indx);
    if(indx - 1 > 0) res3 = mn / (indx - 1);
    int ans = min(res1,res2);
        ans = min(ans,res3);
    cout<<ans<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main( )
{
    int n;
    cin>>n;
    int ara[300009];
    int mn = 1e9 +100;
    for(int i=1; i<=n; i++)
    {
        cin>>ara[i];
    }
    int ans =1e9+55;
    int res2;
    int res3;
    for(int i=1; i<=n; i++)
    {
        if(n-i > 0)
        {
            res2 = min(ara[i],ara[n]) / (n - i);
            ans = min(ans,res2);
        }
        if(i - 1 > 0)
        {
            res3 = min(ara[i],ara[1]) / (i-1);
            ans = min(ans,res3);
        }

    }
    cout<<ans<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int a[330000];

int p(int f,int l)
{
    while(a[f]==a[l]&&f<l)
    {
        f++;
        l--;
    }
    return a[l]>=a[f];
}

int main()
{
    int n,i,t=987654321;
    cin>>n;
    int f=1,l=n;
    for(i=1;i<=n;i++)
        cin>>a[i];
    for(i=n-1;i>0;i--)
    {
        if(a[f]<a[l])
        {
            t=min(t,a[f]/i);
            f++;
        }
        else if(a[f]>a[l])
        {
            t=min(t,a[l]/i);
            l--;
        }
        else
        {
            if(p(f,l))
            {
                t=min(t,a[f]/i);
                f++;
            }
            else
            {
                t=min(t,a[l]/i);
                l--;
            }
        }
    }
    cout<<t;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int a[330000];

int p(int f,int l)
{
    while(a[f]==a[l])
    {
        f++;
        l--;
    }
    return a[l]>a[f];
}

int main()
{
    int n,i,t=987654321;
    cin>>n;
    int f=1,l=n;
    for(i=1;i<=n;i++)
        cin>>a[i];
    for(i=n-1;i>0;i--)
    {
        if(a[f]<a[l])
        {
            t=min(t,a[f]/i);
            f++;
        }
        else if(a[f]>a[l])
        {
            t=min(t,a[l]/i);
            l--;
        }
        else
        {
            if(p(f,l))
            {
                t=min(t,a[f]/i);
                f++;
            }
            else
            {
                t=min(t,a[l]/i);
                l--;
            }
        }
    }
    cout<<t;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int a[330000];

int main()
{
    int n,i,t=987654321,m=987654321;
    cin>>n;
    int f=1,l=n;
    for(i=1;i<=n;i++)
        cin>>a[i];
    for(i=n-1;f<=l;i--)
    {
        t=min(t,a[f]);
        t=min(t,a[l]);
        m=min(m,t/i);
        f++;
        l--;
    }
    cout<<m;
    return 0;
}


#include<stdio.h>
#include<iostream>
#include<string>
#include<cstring>
#include <iomanip>
#include<stack>
#include<set>
#include<vector>
#include<algorithm>
#include<set>
#include<bitset>
#include<map>
#include<queue>
#include<math.h>
#include <time.h>
using namespace std;
//set<int>::iterator it;
#define mdlo 1000000007
#define maxERR 0.000000002
//#define minVal -10000000000000
#define maxBits 40
#define pi 3.1415926535897932384626433832795
#define INF 999999999999
#define lim 10000007
typedef long long ll;
long long mInv[41];
long long fact[41];
long long factInv[41];
map<string,long>cityId;
typedef vector<long>adjList;
typedef pair<long,long>edge;
vector<edge>criticalEdges;
adjList Graph[29];
ll heights[5];
ll segTree[3];
long nums[5005];
long g[5005];

ll S[1000006];
ll M[1000006];

ll as,cs,rs;
ll am,cm,rm;
ll N,D;
//ll dp[2][5002][5002];
vector<long>primes;
vector<long>badPrimes;
long funcVal[1];
long dfs_num[29],dfs_low[29],visited[29],parent[19],criticalNode[19];
set<string>dictionary;
set<string>::iterator it;
pair<set<string>::iterator,bool> ret;
typedef multiset<long> numset;
ll gcd(ll a,ll b){
    if(b==0)
        return a;
    if(a%b==0)
        return b;
    return gcd(b,a%b);
}
long long getmoduloInv(long long n){
    if(n==1)
        return 1;
    if(mInv[n]>0)
        return mInv[n];
    long long m=(-1*mdlo)/n;
    m+=mdlo;
    m*=getmoduloInv(mdlo%n);
    mInv[n]=(m%mdlo);
    return mInv[n];
}
vector< long> get_primes(unsigned long maxN){

    char *sieve;
    sieve = new char[maxN/8+1];
    // Fill sieve with 1
    long m=(maxN/8)+1;
    for(long long i=0;i<m;i++)
        sieve[i]=255;
    for(unsigned long x = 2; x <= maxN; x++)
        if(sieve[x/8] & (0x01 << (x % 8))){
            primes.push_back(x);
            // Is prime. Mark multiplicates.
            for(unsigned long j = 2*x; j <= maxN; j += x)
                sieve[j/8] &= ~(0x01 << (j % 8));
        }
    delete[] sieve;
    return primes;
}
ll getPow(ll b,ll p){
	if(b<2||p==1)
		return b;
	if(p==0)
		return 1;
	ll val=getPow(b,p/2);
	val*=val;
	val%=mdlo;
	if(p%2==1){
		val*=b;
		val%=mdlo;
	}
	return val;
}
void buildSegTree(long node,long b,long e){
    if(b==e)
        segTree[node]=b;
    else{
        long mid=(b+e)/2;
        buildSegTree(node*2,b,mid);
        buildSegTree(1+node*2,mid+1,e);
        if(heights[segTree[node*2]]<=heights[segTree[1+node*2]])
            segTree[node]=segTree[node*2];
        else
            segTree[node]=segTree[1+node*2];
    }
}
long long getMin(long node,long segBeg,long segEnd,long qBeg,long qEnd){
    if(segEnd<qBeg||segBeg>qEnd)
        return N+1;
    if(segBeg>=qBeg&&segEnd<=qEnd)
        return segTree[node];
    long mid=(segBeg+segEnd)/2;
    long fh=getMin(node*2,segBeg,mid,qBeg,qEnd);
    long sh=getMin(1+node*2,mid+1,segEnd,qBeg,qEnd);
    if(heights[sh]<heights[fh])
        return sh;
    return fh;
}
long bff[1100];
long inq[1010];
long source;
long oneEndBig=0,oneEndSmall=0,twoendans,zeroendans;
typedef pair<long,long>ee;
typedef pair<long,ee>openAns;
vector<openAns>allopenANs;
long bigEntry,bigExit,smallEntry,smallExit;
long dfs(long node,long curLen){
    if(inq[node]==0){
        inq[node]=1;
        dfs(bff[node],curLen+1);
    }
    else if(node==source)
    {
        if(zeroendans<curLen)
            zeroendans=curLen;
    }
    else if(bff[bff[node]]==node){
        curLen-=2;
        openAns oA;
        oA.first=curLen;
        oA.second.first=bff[node];
        oA.second.first=node;
        allopenANs.push_back(oA);
    }
  //  queue<long>
  return 0;
}
long dp[1010][5];
long wordLen;
string s1,s2,s3;
bool isvalid(long pos,long prev){
    if(dp[pos][prev]==0)
        return false;
    if(dp[pos][prev]==1)
        return true;
    ll remaining=wordLen-(pos);
    if(remaining==0)
        return true;
    if(remaining==1||remaining<0)
        return false;
    if(prev==2){
        if(remaining>4||isvalid(pos+3,3)||remaining==3){
        dp[pos][prev]=1;
        return true;
        }
        if(s1[pos]!=s1[pos-2]||s1[pos+1]!=s1[pos-1]){
            return isvalid(pos+2,2);
        }
        return false;
    }
    if(prev==3){
        if(isvalid(pos+2,2)){
            dp[pos][prev]=1;
            return true;
        }
        for(long i=0;i<3;i++)
        {
            if(s1[pos+i]!=s1[pos+i-3]){
                if(isvalid(pos+3,3)){
                    dp[pos][prev]=1;
                    return true;
                }
                else{
                    dp[pos][prev]=0;
                    return false;
                }
            }
        }
    }

}
long perMutation[20];

long getSuffixes(string s){
    if(s.length()<7){
        cout<<0<<endl;
        return 0;
    }
    wordLen=s.size();
/*
    if(s.length()<9){
        s2="";
        for(long i=5;i<s.length();i++)
            s2+=s1[i];
        dictionary.insert(s2);
        return 1;
    }
    */
    for(long i=5;i+1<s.length();i++){
        s2="";
        s2+=s1[i];
        s2+=s1[i+1];
        s3=s2;
        if(i+2<s.length())
        s3+=s1[i+2];
        if(isvalid(i+2,2))
            dictionary.insert(s2);
        if(isvalid(i+3,3))
            dictionary.insert(s3);

    }

    if(dictionary.size()==1481){
        for(long i=0;i<wordLen;i++){
            cout<<s[i];
            if((i-1)%130==0)
                cout<<endl;
        }

    }
    cout<<dictionary.size()<<endl;
    set<string>::iterator it=dictionary.begin();
    while(it!=dictionary.end()){
        cout<<*it<<endl;
        it++;
    }

}
ll getSuffixes(long pos){
    ll remaining=wordLen-(pos+1);
    if(remaining<2)
        return 0;
    if(remaining<4){
        s2="";
        s2+=s1[pos];
        s2+=s1[pos+1];
        if(remaining==3)
            s2+=s1[pos+2];
        dictionary.insert(s2);
        return 1;
    }

}
int main(void){
    //freopen ("E:/inputSmall.txt","r",stdin);
    //freopen ("E:/outputSmall.txt","w",stdout);
    ll test_cases=1,l,seed=1,maxVal;
	//memset(dp,0,sizeof(dp));
	//cin>>test_cases;
    cout << setprecision(15) << fixed;
    memset(dp,-1,sizeof(dp));
    long num;
    ll sum=0,ans=1,maxlen=0,leng;
    double d,h,e,v,area,rainVol;
    for(long T=0;T<test_cases;T++){

        cin>>s1;
        getSuffixes(s1);
        //cout<<ans<<endl;

        //cout<<"Case #"<<T+1<<": ";
        //cout<<max(ans2,zeroendans);
        //cout<<endl;
    }
    return 0;
}
/*ll cumDist1[100005];
ll cumDist2[100005];
vector<ll>distFrom1;
vector<ll>distFrom2;
void initFact(){
    fact[0]=1;
    factInv[0]=1;
    for(ll i=1;i<0;i++){
        factInv[i]=(factInv[i-1]*getmoduloInv(i))%mdlo;
        fact[i]=(fact[i-1]*i)%mdlo;
    }
}
bool isLeapyear(long year){
    if(year%4==0&&(year%100!=0||year%400==0))
        return true;
    return false;
}
ll ds,ms,ys,de,me,ye,dc,mc,yc,day;
void next13th(){
    if(ds<13){
        ds=13;
        return;
    }
    ms++;
    ds=13;
    if(ms>12)
    {
        ms=1;
        ys++;
    }
}
    long months[]={31,28,31,30,31,30,31,31,30,31,30,31};
    long dayBeforeMonth[12];
bool validDate(){
    if(ys>ye)
        return false;
    if(ys<ye)
        return true;
    if(ms>me)
        return false;
    if(ms<me)
        return true;
    if(ds>de)
        return false;
    return true;
}
long getDay(long d,long m,long y){
    long day=((y-1900)*365+(y-1900)/4-(y-1900)/100+(y-1600)/400+dayBeforeMonth[m-1]+d+2)%7;
    if(y%4==0&&m<3){
        if(y%400==0||y%100!=0)
            day=(day+6)%7;
    }
    return day;
}
bool iscurDayFriday(){
    if(getDay(ds,ms,ys)==0)
        return true;
    return false;
}
void dijkstra(long startPoint){
    long m;
    if(startPoint==1)
        m=0;
    else
        m=1;
    distMatrix[m][startPoint]=0;
    priority_queue<edge, vector<edge>,greater <edge>>pq;
    pq.push(edge(0,startPoint));
    while(!pq.empty()){
        edge top=pq.top();
        pq.pop();
        ll d= top.first,u=top.second;
        if(distMatrix[m][u]==d){
            for(long i=0;i<graph[u].size();i++){
                ll v=graph[u][i].second;
                ll ec=graph[u][i].first;
                if(distMatrix[m][v]>distMatrix[m][u]+ec){
                    distMatrix[m][v]=distMatrix[m][u]+ec;
                    pq.push(edge(distMatrix[m][v],v));
                }
            }
        }
    }
}
ll vals[1];
ll dp[1];
ll totalSum[1];
long long mInv[1];
long long fact[1];
long long factInv[1];

//long long pow10[18];
long long getmoduloInv(long long n){
    if(n==1)
        return 1;
    if(mInv[n]>0)
        return mInv[n];
    long long m=(-1*mdlo)/n;
    m+=mdlo;
    m*=getmoduloInv(mdlo%n);
    mInv[n]=(m%mdlo);
    return mInv[n];
}
long long onNthbit(long pos,long val){
    return val|pwr2[pos];
}
bool isNthbitOn(long long pos,long long val){
    return (val&pwr2[pos])>0;
}

seg segTree[5];
long N;
void buildSumSegmentTree(long long b,long long e,long long node){
    if(b==e)
    {
         segTree[node].first=vals[b];
         return;
    }
    long long mid=(b+e)/2;
    buildSumSegmentTree(b,mid,node*2);
    buildSumSegmentTree(mid+1,e,1+(node*2));
    segTree[node].first=segTree[2*node].first+segTree[1+(node*2)].first;
}
long long getSum(long long qStart,long long qEnd,long long sStart,long long sEnd,long long node,prop p){

    long k=sEnd-sStart,n;
    for(long i=0;i<p.size();i++){
        segTree[node].second.push_back(p[i]);
        n=p[i];
        segTree[node].first+=(((n+k)*(n+k+1)*(2*n+2*k+1)-(n*(n-1)*(2*n-1)))/6+((n+k)*(n+k+1)-n*(n-1)))/2;
        }
    if(qEnd<sStart||qStart>sEnd)
    {
        return 0;
    }
    if(sStart>=qStart&&sEnd<=qEnd)
    {
         return segTree[node].first;
    }
    long long sMid=(sStart+sEnd)/2;
    prop l;
    for(long i=0;segTree[node].second.size();i++)
        l.push_back(segTree[node].second[i]+sMid+1-sStart);
    return getSum(qStart,qEnd,sStart,sMid,2*node,segTree[node].second)+getSum(qStart,qEnd,sMid+1,sEnd,1+(2*node),l);
}
long long update(ll node, long long sStart,ll sEnd,long upStart,long upEnd){
    if(upEnd<sStart||upStart>sEnd)
        return 0;
    long k=sEnd-sStart,n=sStart+1-upStart;
    if(upStart<=sStart&&upEnd>=sEnd){
        segTree[node].second.push_back(n);
        segTree[node].first+=(((n+k)*(n+k+1)*(2*n+2*k+1))/6);
        segTree[node].first-=(((n*(n-1)*(2*n-1)))/6);
        segTree[node].first+=(((n+k)*(n+k+1)-n*(n-1)))/2;
        return 0;
    }
    ll sMid=(sStart+sEnd)/2;
    update(node*2,sStart,sMid,upStart,upEnd);
    update(1+(node*2),sMid+1,sEnd,upStart,upEnd);
    segTree[node].first=segTree[2*node].first+segTree[1+(node*2)].first;

    for(long i=0;i<segTree[node].second.size();i++){
        n=segTree[node].second[i];
        segTree[node].first+=(((n+k)*(n+k+1)*(2*n+2*k+1)-(n*(n-1)*(2*n-1)))/6+((n+k)*(n+k+1)-n*(n-1)))/2;
    }
    return segTree[node].first;
}
void update(long x,long y){
    long len=y-x+1,add=0;
    for(long i=0;i<len;i++){
        add+=(i+1)*2;
        update(1,0,N-1,x+i,add+vals[x+i]);
    }
}
long getlen(long long num){
    long len=0;
    while(num>0){
        num/=10;
        len++;
    }
    return len;
}
encryptedLine lineConverter(string s){
    encryptedLine el;
    ll val=0,len=s.size();
    for(long i=0;i<len;i++){
        if(s[i]==' '){
            el.push_back(val);
            val=0;
        }
        else{
            val*=26;
            val+=(s[i]-'a');
        }
    }
    el.push_back(val);
    return el;
}
long getPalinDrome(long num){
    long a=num%10;
    long b=(num/10)%10;
    long c=(num/100)%10;
    return num*1000+a*100+b*10+c;
}

vector<unsigned long> get_primes(unsigned long max){
    vector<unsigned long> primes;
    char *sieve;
    sieve = new char[max/8+1];
    // Fill sieve with 1
    long m=(max/8)+1;
    for(long long i=0;i<m;i++)
        sieve[i]=255;
    for(unsigned long x = 2; x <= max; x++)
        if(sieve[x/8] & (0x01 << (x % 8))){
            primes.push_back(x);
            // Is prime. Mark multiplicates.
            for(unsigned long j = 2*x; j <= max; j += x)
                sieve[j/8] &= ~(0x01 << (j % 8));
        }
    delete[] sieve;
    return primes;
}string add(string a,string b){
    int l1=a.size();
    int l2=b.size();
    while(l1<l2){
        a="0"+a;
        l1++;
    }
    while(l2<l1){
        b="0"+b;
        l2++;
    }
    string s;
    int carry=0;
    for(long i=l2-1;i>-1;i--){
        int d=a[i]+b[i]+carry-2*'0';
        carry=d/10;
        a[i]='0'+(d%10);
    }
    if(carry)
        a="1"+a;
    return a;
}
long long mInv[1010];
long long fact[1000];
long long factInv[1000];
long long getmoduloInv(long long n){
    if(n==1)
        return 1;
    if(mInv[n]>0)
        return mInv[n];
    long long m=(-1*mdlo)/n;
    m+=mdlo;
    m*=getmoduloInv(mdlo%n);
    mInv[n]=(m%mdlo);
    return mInv[n];

}

long dp[200010];
vector<weightedPos>points;
vector<weightedPos>modifiedPositions;
vector<long long>heights;
long long segTree[530010];
long N,X,W;
void buildSegTree(long node,long b,long e){
    if(b==e)
        segTree[node]=b;
    else{
        long mid=(b+e)/2;
        buildSegTree(node*2,b,mid);
        buildSegTree(1+node*2,mid+1,e);
        if(heights[segTree[node*2]]<=heights[segTree[1+node*2]])
            segTree[node]=segTree[node*2];
        else
            segTree[node]=segTree[1+node*2];
    }
}
long long getMin(long node,long segBeg,long segEnd,long qBeg,long qEnd){
    if(segEnd<qBeg||segBeg>qEnd)
        return N;
    if(segBeg>=qBeg&&segEnd<=qEnd)
        return segTree[node];
    long mid=(segBeg+segEnd)/2;
    long fh=getMin(node*2,segBeg,mid,qBeg,qEnd);
    long sh=getMin(1+node*2,mid+1,segEnd,qBeg,qEnd);
    if(heights[sh]<heights[fh])
        return sh;
    return fh;
}
long long getMinPos(long node,long segBeg,long segEnd,long qBeg,long qEnd){
    if(segEnd<qBeg||segBeg<qEnd)
        return 0;
    if(segBeg>=qBeg&&segEnd<=qEnd)
        return segTree[node];
    long mid=(segBeg+segEnd)/2;
    long fh=getMin(node*2,segBeg,mid,qBeg,qEnd);
    long sh=getMin(node*2,mid+1,segEnd,qBeg,qEnd);
    return min(fh,sh);
}
long getPos(long val){
    long low=0,high=modifiedPositions.size()-1;
    long mid=(low+high)/2;
    while(low<high){
        if(modifiedPositions[mid].first<val)
            low=mid+1;
        else
            high=mid-1;
        mid=(low+high)/2;
    }
    if(mid>0)
        mid--;
    while(mid<modifiedPositions.size()&&modifiedPositions[mid].first<val)
        mid++;
    return mid;
}
long getMaxGroup(long index){
    if(dp[index]>-1)
        return dp[index];
    long pos=getPos(points[index].first+points[index].second);
    if(pos>=N)
        return 1;
    long nextPoint=getMin(1,0,N-1,pos,N-1);
    dp[index]=1+getMaxGroup(nextPoint);
    return dp[index];
}
*/


#include<stdio.h>
#include<iostream>
#include<string>
#include<cstring>
#include <iomanip>
#include<stack>
#include<set>
#include<vector>
#include<algorithm>
#include<set>
#include<bitset>
#include<map>
#include<queue>
#include<math.h>
#include <time.h>
using namespace std;
//set<int>::iterator it;
#define mdlo 1000000007
#define maxERR 0.000000002
//#define minVal -10000000000000
#define maxBits 40
#define pi 3.1415926535897932384626433832795
#define INF 999999999999
#define lim 10000007
typedef long long ll;
long long mInv[41];
long long fact[41];
long long factInv[41];
map<string,long>cityId;
typedef vector<long>adjList;
typedef pair<long,long>edge;
vector<edge>criticalEdges;
adjList Graph[29];
ll heights[5];
ll segTree[3];
long nums[5005];
long g[5005];

ll S[1000006];
ll M[1000006];

ll as,cs,rs;
ll am,cm,rm;
ll N,D;
//ll dp[2][5002][5002];
vector<long>primes;
vector<long>badPrimes;
long funcVal[1];
long dfs_num[29],dfs_low[29],visited[29],parent[19],criticalNode[19];
set<string>dictionary;
set<string>::iterator it;
pair<set<string>::iterator,bool> ret;
typedef multiset<long> numset;
ll gcd(ll a,ll b){
    if(b==0)
        return a;
    if(a%b==0)
        return b;
    return gcd(b,a%b);
}
long long getmoduloInv(long long n){
    if(n==1)
        return 1;
    if(mInv[n]>0)
        return mInv[n];
    long long m=(-1*mdlo)/n;
    m+=mdlo;
    m*=getmoduloInv(mdlo%n);
    mInv[n]=(m%mdlo);
    return mInv[n];
}
vector< long> get_primes(unsigned long maxN){

    char *sieve;
    sieve = new char[maxN/8+1];
    // Fill sieve with 1
    long m=(maxN/8)+1;
    for(long long i=0;i<m;i++)
        sieve[i]=255;
    for(unsigned long x = 2; x <= maxN; x++)
        if(sieve[x/8] & (0x01 << (x % 8))){
            primes.push_back(x);
            // Is prime. Mark multiplicates.
            for(unsigned long j = 2*x; j <= maxN; j += x)
                sieve[j/8] &= ~(0x01 << (j % 8));
        }
    delete[] sieve;
    return primes;
}
ll getPow(ll b,ll p){
	if(b<2||p==1)
		return b;
	if(p==0)
		return 1;
	ll val=getPow(b,p/2);
	val*=val;
	val%=mdlo;
	if(p%2==1){
		val*=b;
		val%=mdlo;
	}
	return val;
}
void buildSegTree(long node,long b,long e){
    if(b==e)
        segTree[node]=b;
    else{
        long mid=(b+e)/2;
        buildSegTree(node*2,b,mid);
        buildSegTree(1+node*2,mid+1,e);
        if(heights[segTree[node*2]]<=heights[segTree[1+node*2]])
            segTree[node]=segTree[node*2];
        else
            segTree[node]=segTree[1+node*2];
    }
}
long long getMin(long node,long segBeg,long segEnd,long qBeg,long qEnd){
    if(segEnd<qBeg||segBeg>qEnd)
        return N+1;
    if(segBeg>=qBeg&&segEnd<=qEnd)
        return segTree[node];
    long mid=(segBeg+segEnd)/2;
    long fh=getMin(node*2,segBeg,mid,qBeg,qEnd);
    long sh=getMin(1+node*2,mid+1,segEnd,qBeg,qEnd);
    if(heights[sh]<heights[fh])
        return sh;
    return fh;
}
long bff[1100];
long inq[1010];
long source;
long oneEndBig=0,oneEndSmall=0,twoendans,zeroendans;
typedef pair<long,long>ee;
typedef pair<long,ee>openAns;
vector<openAns>allopenANs;
long bigEntry,bigExit,smallEntry,smallExit;
long dfs(long node,long curLen){
    if(inq[node]==0){
        inq[node]=1;
        dfs(bff[node],curLen+1);
    }
    else if(node==source)
    {
        if(zeroendans<curLen)
            zeroendans=curLen;
    }
    else if(bff[bff[node]]==node){
        curLen-=2;
        openAns oA;
        oA.first=curLen;
        oA.second.first=bff[node];
        oA.second.first=node;
        allopenANs.push_back(oA);
    }
  //  queue<long>
  return 0;
}
long dp[10010][5];
long wordLen;
string s1,s2,s3;
bool isvalid(long pos,long prev){
    if(dp[pos][prev]==0)
        return false;
    if(dp[pos][prev]==1)
        return true;
    ll remaining=wordLen-(pos);
    if(remaining==0)
        return true;
    if(remaining==1||remaining<0)
        return false;
    if(prev==2){
        if(remaining>4||isvalid(pos+3,3)||remaining==3){
        dp[pos][prev]=1;
        return true;
        }
        if(s1[pos]!=s1[pos-2]||s1[pos+1]!=s1[pos-1]){
            return isvalid(pos+2,2);
        }
        return false;
    }
    if(prev==3){
        if(isvalid(pos+2,2)){
            dp[pos][prev]=1;
            return true;
        }
        for(long i=0;i<3;i++)
        {
            if(s1[pos+i]!=s1[pos+i-3]){
                if(isvalid(pos+3,3)){
                    dp[pos][prev]=1;
                    return true;
                }
                else{
                    dp[pos][prev]=0;
                    return false;
                }
            }
        }
    }

}
long perMutation[20];

long getSuffixes(string s){
    if(s.length()<7){
        cout<<0<<endl;
        return 0;
    }
    wordLen=s.size();
/*
    if(s.length()<9){
        s2="";
        for(long i=5;i<s.length();i++)
            s2+=s1[i];
        dictionary.insert(s2);
        return 1;
    }
    */
    for(long i=5;i+1<s.length();i++){
        if(i==1005){
            s2="";
        }
        s2="";
        s2+=s1[i];
        s2+=s1[i+1];
        s3=s2;
        if(i+2<s.length())
        s3+=s1[i+2];
        if(isvalid(i+2,2))
            dictionary.insert(s2);
        else
            s2=s3;
        if(isvalid(i+3,3))
            dictionary.insert(s3);
        else
            s3=s2;

    }

    /*if(dictionary.size()==1481){
        for(long i=1010;i<wordLen;i++){
            cout<<s[i];
            if((i-1009)%145==0)
                cout<<endl;
        }

    }*/
    cout<<dictionary.size()<<endl;
    set<string>::iterator it=dictionary.begin();
    while(it!=dictionary.end()){
        cout<<*it<<endl;
        it++;
    }

}
ll getSuffixes(long pos){
    ll remaining=wordLen-(pos+1);
    if(remaining<2)
        return 0;
    if(remaining<4){
        s2="";
        s2+=s1[pos];
        s2+=s1[pos+1];
        if(remaining==3)
            s2+=s1[pos+2];
        dictionary.insert(s2);
        return 1;
    }

}
int main(void){
    //freopen ("E:/inputSmall.txt","r",stdin);
    //freopen ("E:/outputSmall.txt","w",stdout);
    ll test_cases=1,l,seed=1,maxVal;
	//memset(dp,0,sizeof(dp));
	//cin>>test_cases;
    cout << setprecision(15) << fixed;
    memset(dp,-1,sizeof(dp));
    long num;
    ll sum=0,ans=1,maxlen=0,leng;
    double d,h,e,v,area,rainVol;
    for(long T=0;T<test_cases;T++){

        cin>>s1;
        getSuffixes(s1);
        //cout<<ans<<endl;

        //cout<<"Case #"<<T+1<<": ";
        //cout<<max(ans2,zeroendans);
        //cout<<endl;
    }
    return 0;
}
/*ll cumDist1[100005];
ll cumDist2[100005];
vector<ll>distFrom1;
vector<ll>distFrom2;
void initFact(){
    fact[0]=1;
    factInv[0]=1;
    for(ll i=1;i<0;i++){
        factInv[i]=(factInv[i-1]*getmoduloInv(i))%mdlo;
        fact[i]=(fact[i-1]*i)%mdlo;
    }
}
bool isLeapyear(long year){
    if(year%4==0&&(year%100!=0||year%400==0))
        return true;
    return false;
}
ll ds,ms,ys,de,me,ye,dc,mc,yc,day;
void next13th(){
    if(ds<13){
        ds=13;
        return;
    }
    ms++;
    ds=13;
    if(ms>12)
    {
        ms=1;
        ys++;
    }
}
    long months[]={31,28,31,30,31,30,31,31,30,31,30,31};
    long dayBeforeMonth[12];
bool validDate(){
    if(ys>ye)
        return false;
    if(ys<ye)
        return true;
    if(ms>me)
        return false;
    if(ms<me)
        return true;
    if(ds>de)
        return false;
    return true;
}
long getDay(long d,long m,long y){
    long day=((y-1900)*365+(y-1900)/4-(y-1900)/100+(y-1600)/400+dayBeforeMonth[m-1]+d+2)%7;
    if(y%4==0&&m<3){
        if(y%400==0||y%100!=0)
            day=(day+6)%7;
    }
    return day;
}
bool iscurDayFriday(){
    if(getDay(ds,ms,ys)==0)
        return true;
    return false;
}
void dijkstra(long startPoint){
    long m;
    if(startPoint==1)
        m=0;
    else
        m=1;
    distMatrix[m][startPoint]=0;
    priority_queue<edge, vector<edge>,greater <edge>>pq;
    pq.push(edge(0,startPoint));
    while(!pq.empty()){
        edge top=pq.top();
        pq.pop();
        ll d= top.first,u=top.second;
        if(distMatrix[m][u]==d){
            for(long i=0;i<graph[u].size();i++){
                ll v=graph[u][i].second;
                ll ec=graph[u][i].first;
                if(distMatrix[m][v]>distMatrix[m][u]+ec){
                    distMatrix[m][v]=distMatrix[m][u]+ec;
                    pq.push(edge(distMatrix[m][v],v));
                }
            }
        }
    }
}
ll vals[1];
ll dp[1];
ll totalSum[1];
long long mInv[1];
long long fact[1];
long long factInv[1];

//long long pow10[18];
long long getmoduloInv(long long n){
    if(n==1)
        return 1;
    if(mInv[n]>0)
        return mInv[n];
    long long m=(-1*mdlo)/n;
    m+=mdlo;
    m*=getmoduloInv(mdlo%n);
    mInv[n]=(m%mdlo);
    return mInv[n];
}
long long onNthbit(long pos,long val){
    return val|pwr2[pos];
}
bool isNthbitOn(long long pos,long long val){
    return (val&pwr2[pos])>0;
}

seg segTree[5];
long N;
void buildSumSegmentTree(long long b,long long e,long long node){
    if(b==e)
    {
         segTree[node].first=vals[b];
         return;
    }
    long long mid=(b+e)/2;
    buildSumSegmentTree(b,mid,node*2);
    buildSumSegmentTree(mid+1,e,1+(node*2));
    segTree[node].first=segTree[2*node].first+segTree[1+(node*2)].first;
}
long long getSum(long long qStart,long long qEnd,long long sStart,long long sEnd,long long node,prop p){

    long k=sEnd-sStart,n;
    for(long i=0;i<p.size();i++){
        segTree[node].second.push_back(p[i]);
        n=p[i];
        segTree[node].first+=(((n+k)*(n+k+1)*(2*n+2*k+1)-(n*(n-1)*(2*n-1)))/6+((n+k)*(n+k+1)-n*(n-1)))/2;
        }
    if(qEnd<sStart||qStart>sEnd)
    {
        return 0;
    }
    if(sStart>=qStart&&sEnd<=qEnd)
    {
         return segTree[node].first;
    }
    long long sMid=(sStart+sEnd)/2;
    prop l;
    for(long i=0;segTree[node].second.size();i++)
        l.push_back(segTree[node].second[i]+sMid+1-sStart);
    return getSum(qStart,qEnd,sStart,sMid,2*node,segTree[node].second)+getSum(qStart,qEnd,sMid+1,sEnd,1+(2*node),l);
}
long long update(ll node, long long sStart,ll sEnd,long upStart,long upEnd){
    if(upEnd<sStart||upStart>sEnd)
        return 0;
    long k=sEnd-sStart,n=sStart+1-upStart;
    if(upStart<=sStart&&upEnd>=sEnd){
        segTree[node].second.push_back(n);
        segTree[node].first+=(((n+k)*(n+k+1)*(2*n+2*k+1))/6);
        segTree[node].first-=(((n*(n-1)*(2*n-1)))/6);
        segTree[node].first+=(((n+k)*(n+k+1)-n*(n-1)))/2;
        return 0;
    }
    ll sMid=(sStart+sEnd)/2;
    update(node*2,sStart,sMid,upStart,upEnd);
    update(1+(node*2),sMid+1,sEnd,upStart,upEnd);
    segTree[node].first=segTree[2*node].first+segTree[1+(node*2)].first;

    for(long i=0;i<segTree[node].second.size();i++){
        n=segTree[node].second[i];
        segTree[node].first+=(((n+k)*(n+k+1)*(2*n+2*k+1)-(n*(n-1)*(2*n-1)))/6+((n+k)*(n+k+1)-n*(n-1)))/2;
    }
    return segTree[node].first;
}
void update(long x,long y){
    long len=y-x+1,add=0;
    for(long i=0;i<len;i++){
        add+=(i+1)*2;
        update(1,0,N-1,x+i,add+vals[x+i]);
    }
}
long getlen(long long num){
    long len=0;
    while(num>0){
        num/=10;
        len++;
    }
    return len;
}
encryptedLine lineConverter(string s){
    encryptedLine el;
    ll val=0,len=s.size();
    for(long i=0;i<len;i++){
        if(s[i]==' '){
            el.push_back(val);
            val=0;
        }
        else{
            val*=26;
            val+=(s[i]-'a');
        }
    }
    el.push_back(val);
    return el;
}
long getPalinDrome(long num){
    long a=num%10;
    long b=(num/10)%10;
    long c=(num/100)%10;
    return num*1000+a*100+b*10+c;
}

vector<unsigned long> get_primes(unsigned long max){
    vector<unsigned long> primes;
    char *sieve;
    sieve = new char[max/8+1];
    // Fill sieve with 1
    long m=(max/8)+1;
    for(long long i=0;i<m;i++)
        sieve[i]=255;
    for(unsigned long x = 2; x <= max; x++)
        if(sieve[x/8] & (0x01 << (x % 8))){
            primes.push_back(x);
            // Is prime. Mark multiplicates.
            for(unsigned long j = 2*x; j <= max; j += x)
                sieve[j/8] &= ~(0x01 << (j % 8));
        }
    delete[] sieve;
    return primes;
}string add(string a,string b){
    int l1=a.size();
    int l2=b.size();
    while(l1<l2){
        a="0"+a;
        l1++;
    }
    while(l2<l1){
        b="0"+b;
        l2++;
    }
    string s;
    int carry=0;
    for(long i=l2-1;i>-1;i--){
        int d=a[i]+b[i]+carry-2*'0';
        carry=d/10;
        a[i]='0'+(d%10);
    }
    if(carry)
        a="1"+a;
    return a;
}
long long mInv[1010];
long long fact[1000];
long long factInv[1000];
long long getmoduloInv(long long n){
    if(n==1)
        return 1;
    if(mInv[n]>0)
        return mInv[n];
    long long m=(-1*mdlo)/n;
    m+=mdlo;
    m*=getmoduloInv(mdlo%n);
    mInv[n]=(m%mdlo);
    return mInv[n];

}

long dp[200010];
vector<weightedPos>points;
vector<weightedPos>modifiedPositions;
vector<long long>heights;
long long segTree[530010];
long N,X,W;
void buildSegTree(long node,long b,long e){
    if(b==e)
        segTree[node]=b;
    else{
        long mid=(b+e)/2;
        buildSegTree(node*2,b,mid);
        buildSegTree(1+node*2,mid+1,e);
        if(heights[segTree[node*2]]<=heights[segTree[1+node*2]])
            segTree[node]=segTree[node*2];
        else
            segTree[node]=segTree[1+node*2];
    }
}
long long getMin(long node,long segBeg,long segEnd,long qBeg,long qEnd){
    if(segEnd<qBeg||segBeg>qEnd)
        return N;
    if(segBeg>=qBeg&&segEnd<=qEnd)
        return segTree[node];
    long mid=(segBeg+segEnd)/2;
    long fh=getMin(node*2,segBeg,mid,qBeg,qEnd);
    long sh=getMin(1+node*2,mid+1,segEnd,qBeg,qEnd);
    if(heights[sh]<heights[fh])
        return sh;
    return fh;
}
long long getMinPos(long node,long segBeg,long segEnd,long qBeg,long qEnd){
    if(segEnd<qBeg||segBeg<qEnd)
        return 0;
    if(segBeg>=qBeg&&segEnd<=qEnd)
        return segTree[node];
    long mid=(segBeg+segEnd)/2;
    long fh=getMin(node*2,segBeg,mid,qBeg,qEnd);
    long sh=getMin(node*2,mid+1,segEnd,qBeg,qEnd);
    return min(fh,sh);
}
long getPos(long val){
    long low=0,high=modifiedPositions.size()-1;
    long mid=(low+high)/2;
    while(low<high){
        if(modifiedPositions[mid].first<val)
            low=mid+1;
        else
            high=mid-1;
        mid=(low+high)/2;
    }
    if(mid>0)
        mid--;
    while(mid<modifiedPositions.size()&&modifiedPositions[mid].first<val)
        mid++;
    return mid;
}
long getMaxGroup(long index){
    if(dp[index]>-1)
        return dp[index];
    long pos=getPos(points[index].first+points[index].second);
    if(pos>=N)
        return 1;
    long nextPoint=getMin(1,0,N-1,pos,N-1);
    dp[index]=1+getMaxGroup(nextPoint);
    return dp[index];
}
*/