#include <bits/stdc++.h>
using namespace std;
long long arr[200009];
void SOL() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long ans = 0;
  long long mx = -4, ff = -3, cv = -34;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
    mx = max(mx, arr[i]);
    if (mx == arr[i]) ff = i;
  }
  for (int i = 1; i <= n; i++)
    if (i != ff) cv = max(cv, arr[i]);
  long long xx = m / (k + 1);
  ans = mx * (m - xx) + cv * xx;
  cout << ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  while (t--) SOL();
  return 0;
}
