#include <bits/stdc++.h>
using namespace std;
long long n, k, A, B;
long long a[100000];
long long solve(int s, int e, int b) {
  if (s == e) {
    return A;
  }
  long long ans1 = B * (e - s) * (1LL << (n - b));
  long long ans2 = ans1;
  if (n - b > 0) {
    long long prefix = (0xFFFFFFFFLL << (n - b)) & ((1LL << n) - 1);
    assert((prefix & a[s]) == (prefix & a[e - 1]));
    prefix &= a[s];
    int m = lower_bound(a, a + k, (prefix | (1LL << (n - b - 1)))) - a;
    ans2 = solve(s, m, b + 1) + solve(m, e, b + 1);
  }
  return min(ans1, ans2);
}
int main() {
  cin >> n >> k >> A >> B;
  for (int i = 0; i < k; i++) {
    cin >> a[i];
    a[i]--;
  }
  sort(a, a + k);
  cout << solve(0, k, 0) << endl;
}
