#include <bits/stdc++.h>
using namespace std;
int N, M, K;
long long A[200005], ANS;
int main() {
  scanf("%d %d %d", &N, &M, &K);
  for (int i = 0; i < N; i++) scanf("%lld", &A[i]);
  sort(A, A + N);
  ANS = (M / (K + 1)) * A[N - 2] + (M - M / (K + 1)) * A[N - 1];
  printf("%lld\n", ANS);
}
