#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long MD = 1e9 + 7;
const long long MAXN = (1 << 17);
const long long BASE = 1e9;
const long double EPS = 1e-12;
const long double pi = acos(-1);
long long n, m, k, a[1000006];
bool cmp(long long aa, long long bb) { return a[aa] < a[bb]; }
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k;
  vector<long long> v;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    v.push_back(i);
  }
  sort(v.begin(), v.end(), cmp);
  reverse(v.begin(), v.end());
  long long ans = 0;
  while (m) {
    if (k < m) {
      long long one = a[v[0]] * k + a[v[1]];
      long long times = m / (k + 1);
      ans += one * times;
      m -= times * (k + 1);
    } else {
      ans += a[v[0]] * m;
      m = 0;
    }
  }
  cout << ans;
}
