#include <bits/stdc++.h>
using namespace std;
const long long N = 200010;
long long a[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, k, m, l, sum = 0, tp;
  long double mx;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + n + 1);
  long double o = m / (k + 1);
  long double ans = 0;
  if (a[n] == a[n - 1]) {
    ans = a[n] * m;
    cout << fixed << setprecision(0) << ans << endl;
    return 0;
  }
  ans = (long long)a[n] * (m - o) + (long long)(a[n - 1] * o);
  cout << fixed << setprecision(0) << ans << endl;
  return 0;
}
