// Author: Adrian Kuegel
// Ternary search doesn't work
#include <stdio.h>
#include <math.h>
#include <algorithm>
using namespace std;

#define MAXN 1000

int y[MAXN], n, a, b;

double eval(double x) {
	double cost = 0;
	for (int i=0; i<n; ++i) {
		int fetches = (int)ceil(y[i] / x);
		cost += (fetches * x - y[i]) * a + fetches * b;
	}
	return cost;
}

int main() {
//	freopen("food.in", "r", stdin);
	while(scanf("%d", &n) == 1 && n) {
		scanf("%d %d", &a, &b);
		int maxval = 0;
		for (int i=0; i<n; ++i) {
			scanf("%d", &y[i]);
			if (y[i] > maxval)
				maxval = y[i];
		}
		/*
		for (int i=1; i<=100; ++i)
			printf("%.6lf\n", eval(maxval*i/100.0));
		*/
		double bestCost = 1e9;
		double range = maxval;
		double middle = range / 2;
		for (int i=0; i<50; ++i) {
			double left = middle - range/2;
			double right = middle + range/2;
			if (3*left < maxval)
				left = maxval/3.0;
			for (int iter=0; iter<100; ++iter) {
				double m1 = (2 * left + right) / 3;
				double m2 = (left + 2 * right) / 3;
				double c1 = eval(m1), c2 = eval(m2);
				if (c1 < c2)
					right = m2;
				else
					left = m1;
			}
			middle = (left + right) / 2;
			bestCost = min(bestCost, eval(middle));
			range *= 0.95;
		}
		printf("%lf\n", bestCost);
	}
	return 0;
}
