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