#include <bits/stdc++.h>
using namespace std;
const int MAX = 5e5 + 5;
const int inf = 1e9;
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
template <typename T>
void LastOut(T x) {
  cout << x << '\n';
  exit(0);
}
long long n, m, k, a[MAX], ans, kek;
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  kek = m / (k + 1);
  cout << kek * (a[n - 2] + a[n - 1] * k) + min(m % (k + 1), k) * a[n - 1]
       << '\n';
  return 0;
}
