#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  pair<long long, long long> pr[n];
  long long largest = -1, secondlargest = -1;
  for (long long i = 0; i < n; i++) {
    cin >> pr[i].first;
    pr[i].second = i + 1;
    if (largest == -1) {
      largest = i;
    } else if (secondlargest == -1) {
      secondlargest = i;
      if (pr[largest].first < pr[i].first) {
        swap(largest, secondlargest);
      }
    } else {
      if (pr[secondlargest].first < pr[i].first) {
        secondlargest = i;
        if (pr[secondlargest].first > pr[largest].first) {
          swap(largest, secondlargest);
        }
      }
    }
  }
  long long tk = k;
  unsigned long long count = 0;
  count += ((m / (k + 1)) * (k * pr[largest].first + pr[secondlargest].first));
  m = m % (k + 1);
  count += m * pr[largest].first;
  cout << count << endl;
}
