#include <bits/stdc++.h>
using namespace std;
long long m, k, n;
int main() {
  cin >> n >> m >> k;
  vector<long long> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  sort(a.rbegin(), a.rend());
  cout << a[0] * (m - m / (k + 1)) + a[1] * (m / (k + 1)) << "\n";
}
