#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m, k;
  cin >> n >> m >> k;
  long long *g = new long long[n];
  for (long long i = 0; i < n; ++i) cin >> g[i];
  sort(g, g + n);
  long long a = g[n - 1];
  long long b = g[n - 2];
  long long z = m / (k + 1);
  long long u = a * k + b;
  cout << z * u + (m % (k + 1)) * a;
}
