#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n = 0, m = 0, k = 0, maxx = 0, minn = 0, ans = 0;
  long long arr[200000] = {0};
  cin >> n >> k >> m;
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  maxx = arr[n - 1], minn = arr[n - 2];
  ans = ((maxx * m + minn) * (k / (m + 1ll)));
  ans += (maxx * (k % (m + 1ll)));
  cout << ans;
  return 0;
}
