#include <bits/stdc++.h>
using namespace std;
const int inf = 2e9;
const long long base = 998244353;
const int maxn = 100;
long long A, B;
long long sol(long long l, long long r, vector<long long> h) {
  if (h.empty()) return A;
  if (r == l) return B * h.size();
  vector<long long> first, second;
  long long mid = (l + r) / 2;
  for (int i = 0; i < h.size(); ++i) {
    if (h[i] <= mid)
      first.push_back(h[i]);
    else
      second.push_back(h[i]);
  }
  return min(B * (r - l + 1) * (long long)(h.size()),
             sol(l, mid, first) + sol(mid + 1, r, second));
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int n, k;
  cin >> n >> k >> A >> B;
  vector<long long> h(k);
  for (int i = 0; i < k; ++i) {
    cin >> h[i];
  }
  sort(h.begin(), h.end());
  cout << sol(1, 1 << n, h);
  return 0;
}
