#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long int t, m, k;
  cin >> t >> m >> k;
  long long int a[t];
  long long int mx = 0;
  long long int n = t;
  for (long long int i = 0; i < t; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  if (m <= k)
    cout << m * a[n - 1] << endl;
  else {
    long long int temp = m / (k + 1);
    long long int ans = temp * (k * a[n - 1] + a[n - 2]);
    temp *= k + 1;
    temp = m - temp;
    ans += temp * a[n - 1];
    cout << ans << endl;
  }
  return 0;
}
