#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  cout << (a[n - 1] * ((m / (k + 1)) * k)) + (a[n - 1] * ((m % (k + 1)))) +
              ((a[n - 2] * ((m / (k + 1)))));
}
signed main() {
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
