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