#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k, a, ans = 0;
  cin >> n >> m >> k;
  vector<int> x;
  for (int i = 0; i < n; i += 1) {
    cin >> a;
    x.push_back(a);
  }
  sort(x.begin(), x.end());
  long long f = k * x[x.size() - 1] + x[x.size() - 2];
  long double g = k + 1;
  if (m >= g) {
    ans += floor(double(m) / g) * f;
    m -= floor(double(m) / g) * g;
  }
  ans += m * x[x.size() - 1];
  cout << ans;
}
