#include <bits/stdc++.h>
using namespace std;
long long q, n, a, b, ans = 0, mx = 1, m = 0, cnt = 1, k;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
  }
  sort(v.begin(), v.end(), greater<int>());
  a = v[0];
  b = v[1];
  cout << a * (m - m / (k + 1)) + b * (m / (k + 1));
  return 0;
}
