#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int a[200005];
int main() {
  while (scanf("%d%d%d", &n, &m, &k) != EOF) {
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    sort(a + 1, a + 1 + n);
    k++;
    long long t = m / k, tt = m % k;
    long long ans = t * (k - 1) * a[n] + t * a[n - 1] + tt * a[n];
    printf("%lld\n", ans);
  }
}
