#include <bits/stdc++.h>
using namespace std;
long long arr[200001], sum, mV, sV;
int n, k, m;
int main() {
  scanf("%d %d %d", &n, &k, &m);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &arr[i]);
  }
  m++;
  sort(arr, arr + n);
  mV = arr[n - 1], sV = arr[n - 2];
  sum += sV * (k / m);
  k -= k / m;
  sum += mV * k;
  printf("%lld", sum);
  return 0;
}
