#include <bits/stdc++.h>
using namespace std;
long long solve(vector<long long> &vec, int l, int r, long long len,
                long long k, long long A, long long B, long long left) {
  if (k == 0) {
    return A;
  } else if (len == 1) {
    return B * k;
  } else {
    int ll = l - 1, rr = r + 1;
    while (rr - ll > 1) {
      int mm = (ll + rr) / 2;
      if (vec[mm] < left + len / 2) {
        ll = mm;
      } else {
        rr = mm;
      }
    }
    long long x =
        min(B * k * len,
            solve(vec, l, ll, len / 2, max(0, ll - l + 1), A, B, left) +
                solve(vec, rr, r, len / 2, max(0, r - rr + 1), A, B,
                      left + len / 2));
    return x;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, k, A, B;
  cin >> n >> k >> A >> B;
  vector<long long> vec(k);
  for (int i = 0; i < k; i++) {
    cin >> vec[i];
  }
  sort(vec.begin(), vec.end());
  long long len = 1;
  for (int i = 0; i < n; i++) {
    len *= 2LL;
  }
  long long ans = solve(vec, 0, k - 1, len, k, A, B, 1);
  cout << ans << endl;
  return 0;
}
