#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k, x = 0, c = 0, b = 0, sum = 0, i;
  cin >> n >> m >> k;
  long long a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  c = a[n - 1];
  b = a[n - 2];
  x = m / (k + 1);
  sum = c * (m - x) + b * x;
  cout << sum;
  return 0;
}
