#include <bits/stdc++.h>
using namespace std;
const string FILENAME = "";
const bool FILE_IO = 1;
const int INF = 1000000000;
void init() {
  if (!FILENAME.empty()) {
    freopen((FILENAME + ".in").c_str(), "r", stdin);
    freopen((FILENAME + ".out").c_str(), "w", stdout);
  }
}
int main() {
  init();
  long long n, k, m, ans = 0, f, s;
  cin >> n >> m >> k;
  vector<long long> arr(n);
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr.begin(), arr.end());
  f = arr[n - 1];
  s = arr[n - 2];
  if (k >= m) {
    ans = f * m;
  } else {
    ans = (f * k + s) * (m / (k + 1));
    if (m % (k + 1)) {
      m %= k + 1;
      ans += f * m;
    }
  }
  cout << ans;
  return 0;
}
