int a[100005];
int t[100005];
ll ans=0;
void guibing(int st,int mid,int ed,int a[],int t[])
{
int x=st,y=mid+1,k=st,num=mid-st+1;
while(x<=mid&&y<=ed)
if(a[x]<=a[y])
t[k++]=a[x++],num--;
else
t[k++]=a[y++],ans+=num;
while(x<=mid)t[k++]=a[x++];
while(y<=ed)t[k++]=a[y++];
for(int i=st;i<=ed;i++)
a[i]=t[i];
}
void merge_sort(int st,int ed,int a[],int t[])
{
int mid=(st+ed)/2;
if(st!=mid)merge_sort(st,mid,a,t);
if(mid+1!=ed)merge_sort(mid+1,ed,a,t);
guibing(st,mid,ed,a,t);
}
int main()
{
int n;
scanf("%d",&n);
for(int i=1;i<=n;i++)
scanf("%d",&a[i]);
merge_sort(1,n,a,t);
printf("%lld\n",ans);
return 0;
}
#include<cstdio>
#include<cmath>
#define eps 1e-6
double a,b,c,x,y;
double dis(double x0,double y0)
{
return sqrt((x-x0)*(x-x0)+(y-y0)*(y-y0));
}
double f(double x0)
{
return a*x0*x0+b*x0+c;
}
int main()
{
scanf("%lf%lf%lf%lf%lf",&a,&b,&c,&x,&y);
double l=-200,r=200,rm,lm;
while(r-l>eps)
{
double lenth=(r-l)/3.0,lm=l+lenth,rm=r-lenth;
double disl=dis(l,f(l)),disr=dis(r,f(r));
double disrm=dis(rm,f(rm)),dislm=dis(lm,f(lm));
if(disrm<dislm)l=lm;
else r=rm;
}
printf("%.3lf\n",dis(l,f(l)));
return 0;
}