#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
long long x, y, a, b, c, l, r, k, m, res;
int n;
long long f[N];
string s;
vector<int> g;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k >> m;
  for (int i = 1; i <= n; ++i) cin >> f[i];
  sort(f + 1, f + 1 + n);
  a = k - k / (m + 1) * (m + 1) + k / (m + 1) * m;
  cout << f[n] * a + f[n - 1] * (k - a);
}
