#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  os << '[';
  string sep;
  for (const auto &x : v) os << sep << x, sep = ", ";
  return os << ']';
}
template <typename T, size_t size>
ostream &operator<<(ostream &os, const array<T, size> &arr) {
  os << '{';
  string sep;
  for (const auto &x : arr) os << sep << x, sep = ", ";
  return os << '}';
}
template <typename A, typename B>
ostream &operator<<(ostream &os, const pair<A, B> &p) {
  return os << '{' << p.first << ", " << p.second << '}';
}
template <typename T>
ostream &operator<<(ostream &os, const set<T> &s) {
  os << '{';
  string sep;
  for (const auto &x : s) os << sep << x, sep = ", ";
  return os << '}';
}
template <typename A, typename B>
ostream &operator<<(ostream &os, const map<A, B> &mp) {
  os << '[';
  string sep;
  for (const auto &x : mp) os << sep << x, sep = ", ";
  return os << ']';
}
template <typename T>
ostream &operator<<(ostream &os, const multiset<T> &s) {
  os << '{';
  string sep;
  for (const auto &x : s) os << sep << x, sep = ", ";
  return os << '}';
}
void dbg_out() { cerr << endl; }
template <typename Head, typename... Tail>
void dbg_out(Head H, Tail... T) {
  cerr << ' ' << H;
  dbg_out(T...);
}
long long N, K, A, B;
vector<long long> v;
long long f(long long l, long long r) {
  long long rrvalue = upper_bound(v.begin(), v.end(), r) - v.begin();
  long long llvalue = lower_bound(v.begin(), v.end(), l) - v.begin();
  long long smm = rrvalue - llvalue;
  if (!smm) return A;
  if (l == r) {
    long long rvalue = upper_bound(v.begin(), v.end(), r) - v.begin();
    long long lvalue = lower_bound(v.begin(), v.end(), l) - v.begin();
    long long sm = rvalue - lvalue;
    if (!sm) return A;
    return sm * B;
  }
  long long rvalue = upper_bound(v.begin(), v.end(), r) - v.begin();
  long long lvalue = lower_bound(v.begin(), v.end(), l) - v.begin();
  long long sm = rvalue - lvalue;
  long long ans1 = (sm == 0LL ? A : sm * B * (r - l + 1LL));
  long long mid = l + (r - l) / 2;
  long long ans2 = f(l, mid) + f(mid + 1LL, r);
  return min(ans1, ans2);
}
void solve() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> N >> K >> A >> B;
  for (long long i = 0; i < K; i++) {
    long long x;
    cin >> x;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  long long ans = f(1LL, 1LL << N);
  cout << ans << '\n';
}
int32_t main() {
  solve();
  return 0;
}
