#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, k;
  cin >> n >> m >> k;
  vector<long long int> a(n);
  for (long long int i = 0; i < n; i++) cin >> a[i];
  map<long long int, long long int> M;
  for (int i = 0; i < n; ++i) M[a[i]]++;
  long long int answer = 0;
  if (M.rbegin()->second > 1)
    answer = m * M.rbegin()->first;
  else {
    long long int mxm = M.rbegin()->first, mxm2;
    M.erase(mxm);
    mxm2 = M.rbegin()->first;
    answer = (m / (k + 1)) * (k * mxm + mxm2) + (m % (k + 1)) * mxm;
  }
  cout << answer << endl;
}
