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