#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000 + 5;
const int inf = 0x3f3f3f3f;
vector<int> v;
int a, b, n, k;
int x;
long long sol(int l, int r) {
  long long num =
      upper_bound(v.begin(), v.end(), r) - lower_bound(v.begin(), v.end(), l);
  long long cost;
  if (num == 0) {
    cost = a;
  } else {
    cost = b * num * (r - l + 1);
    if (r > l) return min(cost, sol(l, (l + r) / 2) + sol((l + r) / 2 + 1, r));
  }
  return cost;
}
int main() {
  scanf("%d %d %d %d", &n, &k, &a, &b);
  int num = 1;
  for (int i = 0; i < n; i++) num *= 2;
  for (int i = 0; i < k; i++) {
    scanf("%d", &x);
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  cout << sol(1, num) << endl;
  return 0;
}
