#include <bits/stdc++.h>
using namespace std;
int main() {
  uint64_t n, m, k;
  cin >> n >> m >> k;
  uint64_t max = 0;
  uint64_t pre_max = 0;
  for (uint64_t i = 0; i < n; ++i) {
    uint64_t a;
    cin >> a;
    if (a > max) {
      pre_max = max;
      max = a;
    } else if (a > pre_max) {
      pre_max = a;
    }
  }
  uint64_t emo_max = 0;
  uint64_t count_tmp = 0;
  count_tmp = m / (k + 1);
  emo_max += count_tmp * (max * k + pre_max);
  emo_max += (m % (k + 1)) * max;
  cout << emo_max;
}
