#include<iostream>
#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<cmath>
using namespace std;
const int maxn=1e5+5;
int is1[maxn],is2[maxn];
long long merge(int low,int mid,int high)
{
int i=low,j=mid+1,k=low;
long long count=0;
while(i<=mid&&j<=high)
if(is1[i]<=is1[j])
is2[k++]=is1[i++];
else
{
is2[k++]=is1[j++];
count+=j-k;
}
while(i<=mid)
is2[k++]=is1[i++];
while(j<=high)
is2[k++]=is1[j++];
for(i=low;i<=high;i++)
is1[i]=is2[i];
return count;
}
long long mergeSort(int a,int b)
{
if(a<b)
{
int mid=(a+b)/2;
long long count=0;
count+=mergeSort(a,mid);
count+=mergeSort(mid+1,b);
count+=merge(a,mid,b);
return count;
}
return 0;
}
int main()
{
int n,x,y;
while(~scanf("%d%d%d",&n,&x,&y))
{
int tmp=min(x,y);
for(int i=1;i<=n;i++)
scanf("%d",&is1[i]);
printf("%lld\n",tmp*mergeSort(1,n));
}
return 0;
}