#include <bits/stdc++.h>
using namespace std;
void fast_io() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
void solve() {
  int n;
  long long m, k;
  cin >> n >> m >> k;
  long long arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  if (k == m) {
    cout << arr[n - 1] * k;
  } else {
    long long ans = (arr[n - 1] * k + arr[n - 2]) * (m / (k + 1));
    ans += arr[n - 1] * (m % (k + 1));
    cout << ans;
  }
}
int main() {
  fast_io();
  solve();
  return 0;
}
