#include <bits/stdc++.h>
using namespace std;
long long a[200010], n, m, k;
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < n; ++i) cin >> a[i];
  sort(a, a + n, greater<int>());
  long long ans = m / (k + 1) * (k * a[0] + a[1]);
  long long res = m % (k + 1);
  ans += res * a[0];
  cout << ans << endl;
  return 0;
}
