#include <bits/stdc++.h>
using namespace std;
long long pwmd(long long a, long long n) {
  if (!n) return 1;
  long long pt = pwmd(a, n / 2);
  pt *= pt, pt %= 1000000007;
  if (n & 1) pt *= a, pt %= 1000000007;
  return pt;
}
void coder_pulkit_c() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long getans(long long beg, long long end, long long *pos, long long k,
                 long long a, long long b) {
  if (beg == end) {
    long long greater_than_equal_to =
        k - (lower_bound(pos, pos + k, beg) - pos);
    long long greater_than = k - (upper_bound(pos, pos + k, beg) - pos);
    long long num_equal_to_beg = greater_than_equal_to - greater_than;
    if (num_equal_to_beg)
      return b * num_equal_to_beg;
    else
      return a;
  }
  long long greater_than_equal_to_beg =
      k - (lower_bound(pos, pos + k, beg) - pos);
  long long greater_than_end = k - (upper_bound(pos, pos + k, end) - pos);
  long long num_bw_beg_and_end = greater_than_equal_to_beg - greater_than_end;
  if (num_bw_beg_and_end == 0) return a;
  long long size = end - beg + 1;
  long long mid = beg + size / 2 - 1;
  long long left = getans(beg, mid, pos, k, a, b);
  left += getans(mid + 1, end, pos, k, a, b);
  long long pura;
  if (num_bw_beg_and_end)
    pura = b * size * num_bw_beg_and_end;
  else
    pura = a;
  return min(pura, left);
}
int32_t main() {
  coder_pulkit_c();
  long long n, k, a, b;
  cin >> n >> k >> a >> b;
  long long *pos = new long long[k];
  ;
  for (long long i = 0; i < k; ++i) cin >> pos[i];
  sort(pos, pos + k);
  long long beg = 1;
  long long end = pow(2, n) + 0.1;
  cout << getans(beg, end, pos, k, a, b);
  return 0;
}
