#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, k, i, a, b, c, d;
  long long int sum;
  long long int s[300000];
  while (scanf("%lld %lld %lld", &n, &m, &k) != EOF) {
    sum = 0;
    for (i = 0; i < n; i++) {
      scanf("%lld", &s[i]);
    }
    sort(s, s + n);
    a = s[n - 1];
    b = s[n - 2];
    c = m / (k + 1);
    d = m % (k + 1);
    sum = (a * k + b) * c + a * d;
    printf("%lld\n", sum);
  }
  return 0;
}
