#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int m, k, i, s = 0, l;
  int n, m1 = 0, m2 = 0;
  cin >> n >> m >> k;
  int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] >= m1) {
      m2 = m1;
      m1 = a[i];
    } else {
      m2 = max(m2, a[i]);
    }
  }
  l = m / (k + 1);
  s = (m1 * k + m2) * l + (m - l * (k + 1)) * m1;
  cout << s;
  return 0;
}
