#include <bits/stdc++.h>
using namespace std;
int aa[200005];
int main() {
  int n, m, k, m1, m2;
  long long ans = 0;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < n; i++) scanf("%d", &aa[i]);
  sort(aa, aa + n);
  m1 = m / (k + 1);
  ans += ((long long)aa[n - 1] * k + aa[n - 2]) * m1;
  m2 = m % (k + 1);
  ans += (long long)aa[n - 1] * m2;
  cout << ans;
  return 0;
}
