#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long n, m, k;
  cin >> n >> m >> k;
  priority_queue<long long> que;
  for (long long i = 1; i <= n; i++) {
    long long t;
    cin >> t;
    que.push(t);
  }
  long long mx = que.top();
  que.pop();
  long long res = que.top();
  long long one = mx * k + res;
  long long can = m / (k + 1);
  long long ans = can * one;
  ans += (m - m / (k + 1) * (k + 1)) * mx;
  cout << ans << endl;
  return 0;
}
