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