#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  vector<long long> a(n);
  long long maxi = -1e9, maxi2 = -1e9;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    maxi = max(maxi, a[i]);
  }
  bool fl = 0;
  for (long long i = 0; i < n; i++) {
    if (!fl && a[i] == maxi) {
      fl = 1;
    } else if (fl && a[i] == maxi) {
      maxi2 = maxi;
      break;
    }
    if (a[i] != maxi) {
      maxi2 = max(maxi2, a[i]);
    }
  }
  if (m == 1) {
    cout << maxi;
    return 0;
  }
  cout << (m / (k + 1)) * (maxi * k + maxi2) + (m % (k + 1)) * maxi;
  return 0;
}
