#include <bits/stdc++.h>
const long long maxn = 2e5 + 5;
const long long mod = 1e9 + 7;
const long long base = 1331;
using namespace std;
long long a[maxn];
long long n;
long long m;
long long k;
void read(void) {
  cin >> n >> m >> k;
  for (long long i = 1; i <= (long long)(n); ++i) cin >> a[i];
  sort(a + 1, a + 1 + n);
  long long x = m / (k + 1);
  long long ans = (a[n] * k + a[n - 1]) * x;
  ans += (m - x * (k + 1)) * a[n];
  cout << ans;
}
signed main(void) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  read();
}
