#include <bits/stdc++.h>
using namespace std;
const int M = 2e5 + 5;
int a[M];
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n, greater<int>());
  long long ans = 0;
  ans += (long long)m / (k + 1) * ((long long)k * a[0] + a[1]);
  ans += (long long)m % (k + 1) * (long long)a[0];
  printf("%lld\n", ans);
  return 0;
}
