#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const double epos = 1e-8;
const int maxn = 2e5 + 7;
int t[maxn];
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < n; ++i) scanf("%d", &t[i]);
  sort(t, t + n);
  int a = t[n - 1], b = t[n - 2];
  bool f = 1;
  long long res = 0;
  long long x = m / (k + 1);
  long long y = m % (k + 1);
  res += x * (a * 1LL * k + b);
  res += y * a;
  printf("%I64d\n", res);
  return 0;
}
