#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 100;
const int mod = 1e9 + 7;
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
long long n, m, k, arr[maxn];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n, greater<long long>());
  long long s = m / (k + 1), f = (m - s);
  cout << arr[0] * f + arr[1] * s << "\n";
  return 0;
}
