#include <bits/stdc++.h>
using namespace std;
const int Z = (int)5e3 + 1;
const int inf = (int)1e9 + 111;
const int64_t llinf = (int64_t)1e18 + 5;
const int MOD = (int)1e9 + 7;
template <class Head, class... Tail>
Head Min(const Head& head, const Tail&... tail) {
  if constexpr (sizeof...(tail) > 0) {
    int res = Min(tail...);
    if (res > head) {
      res = head;
    }
    return res;
  } else {
    return head;
  }
}
template <class Head, class... Tail>
Head Max(const Head& head, const Tail&... tail) {
  if constexpr (sizeof...(tail) > 0) {
    int res = Max(tail...);
    if (res < head) {
      res = head;
    }
    return res;
  } else {
    return head;
  }
}
template <class T1, class... Args>
bool UpdateMin(T1& a, Args&&... args) {
  auto value = Min(forward<Args>(args)...);
  if (a > value) {
    a = value;
    return true;
  }
  return false;
}
template <class T1, class... Args>
bool UpdateMax(T1& a, Args&&... args) {
  auto value = Max(forward<Args>(args)...);
  if (a < value) {
    a = value;
    return true;
  }
  return false;
}
template <class T>
ostream& operator<<(ostream& out, const vector<T>& a) {
  for (const auto& it : a) {
    out << it << " ";
  }
  out << "\n";
  return out;
}
template <class T>
istream& operator>>(istream& in, vector<T>& a) {
  for (auto& it : a) {
    in >> it;
  }
  return in;
}
template <class T1, class T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& p) {
  out << '(' << p.first << ", " << p.second << ')';
  return out;
}
class Debug {
 public:
  template <class Container>
  static void Print(const Container& s, const string& message = {}) {
    Print(s, '{', '}', message);
  }
  template <class T>
  static void Print(const vector<T>& a, const string& message = {}) {
    Print(a, '[', ']', message);
  }

 private:
  template <class Container>
  static void Print(const Container& s, char begin_c, char end_c,
                    const string& message) {
    cerr << begin_c;
    bool first = true;
    for (const auto& it : s) {
      if (!first) {
        cerr << ", ";
      }
      first = false;
      cerr << it;
    }
    cerr << end_c;
    if (!message.empty()) {
      cerr << " <--- " << message;
    }
    cerr << "\n";
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  mt19937_64 random_generator(228);
  int64_t n, m, k;
  cin >> n >> m >> k;
  vector<int64_t> a(n);
  cin >> a;
  sort(begin(a), end(a));
  reverse(begin(a), end(a));
  int64_t cnt = m / (k + 1);
  m %= (k + 1);
  int64_t ans = cnt * (k * a[0] + a[1]);
  ans += 1LL * a[0] * m;
  cout << ans;
  return 0;
}
