#include <bits/stdc++.h>
using namespace std;
int n, k, A, B;
vector<int> a;
int g(int x) {
  int ok = -1, ng = k;
  while (ok + 1 < ng) {
    int m = (ok + ng) / 2;
    if (a[m] <= x)
      ok = m;
    else
      ng = m;
  }
  return ok;
}
long long f(int m, int x) {
  int lft = (x << m), rit = ((x + 1) << m);
  int na = g(rit) - g(lft);
  int l = rit - lft;
  if (na == 0) return A;
  long long tmp = (long long)B * na * l;
  if (m == 0) return tmp;
  long long res = f(m - 1, x * 2) + f(m - 1, x * 2 + 1);
  return min(tmp, res);
}
void solve() {
  cin >> n >> k >> A >> B;
  a.assign(k, 0);
  for (int i = 0; i < k; i++) cin >> a[i];
  sort(a.begin(), a.end());
  cout << f(n, 0) << endl;
}
int main(void) {
  int t = 1;
  while (t--) solve();
}
