#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  while (scanf("%d%d%d", &n, &m, &k) != EOF) {
    priority_queue<long long> pq;
    while (!pq.empty()) pq.pop();
    long long t;
    for (int i = 0; i < n; i++) {
      scanf("%lld", &t);
      pq.push(t);
    }
    long long ma1 = pq.top();
    pq.pop();
    long long ma2 = pq.top();
    pq.pop();
    long long ans = (k * ma1 + ma2) * (m / (k + 1)) + (m % (k + 1)) * ma1;
    printf("%lld\n", ans);
  }
  return 0;
}
