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