#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  unsigned long long n, m, k, i, a[200010], sum = 0, c = 0, cnt = 0, x, y;
  cin >> n >> m >> k;
  for (i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  x = m / (k + 1);
  y = m - x;
  sum += (y * a[n - 1]);
  sum += (x * a[n - 2]);
  cout << sum << endl;
  return 0;
}
