#include <bits/stdc++.h>
using namespace std;
long long arr[200005];
int main() {
  long long n, m, k, a, b, ans;
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    scanf("%lld", &arr[i]);
  }
  sort(arr, arr + n);
  k++;
  a = m / k, b = m % k;
  ans = a * arr[n - 1] * (k - 1) + a * arr[n - 2];
  if (b) {
    ans += (b * arr[n - 1]);
  }
  cout << ans << endl;
}
