#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int a[N];
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  sort(a + 1, a + n + 1, greater<int>());
  int x = m / (k + 1), y = m % (k + 1);
  cout << 1LL * x * (1LL * k * a[1] + a[2]) + 1LL * a[1] * y;
}
