#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t n, x, k, m;
  vector<int> arr;
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    cin >> x;
    arr.push_back(x);
  }
  sort(arr.begin(), arr.end());
  int64_t a, b;
  a = m / (k + 1);
  b = m % (k + 1);
  cout << a * (k * arr[n - 1] + arr[n - 2]) + b * arr[n - 1];
}
