#include <bits/stdc++.h>
using namespace std;
int n, m, k, p;
int a[200005];
long long ans;
inline bool cmp(int x, int y) { return x > y; }
int main() {
  scanf("%d %d %d\n", &n, &m, &k);
  for (int i = 1; i <= n; ++i) scanf("%d ", &a[i]);
  sort(a + 1, a + n + 1, cmp);
  p = m / (k + 1);
  ans = 1ll * (1ll * a[1] * k + 1ll * a[2]) * p;
  m -= p * (k + 1);
  ans = 1ll * ans + 1ll * a[1] * m;
  cout << ans;
  return 0;
}
