#include<bits/stdc++.h>
using namespace std;
int n;
int main(void)
{
freopen("Unnamed_Problem.in","r",stdin);
freopen("Unnamed_Problem.out","w",stdout);
long long a=1000001,b,c=0;
scanf("%d",&n);
for(int i=1;i<=n;++i)
{
long long x;
scanf("%lld",&x);
if(x<a)
{
c=a;
a=x;
}
if(x>b)
{
b=x;
}
if(x>a&&x<c)
{
c=x;
}
}
long long ans;
ans=c-b*b/(a*4);
printf("%lld",ans);
return 0;
}