#include <bits/stdc++.h>
using namespace std;
int a[300005];
map<int, int> M;
set<int> s;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, k, mx = 0;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    mx = max(a[i], mx);
    M[a[i]]++;
    s.insert(a[i]);
  }
  if (M[mx] >= 2) {
    cout << 1LL * mx * m << '\n';
    return 0;
  }
  auto it = s.end();
  it--;
  it--;
  long long int sec_mx = *it;
  long long int ans = 0;
  ans = 1LL * k * mx;
  ans += sec_mx;
  ans = 1LL * ans * (m / (k + 1));
  ans += 1LL * (m % (k + 1)) * mx;
  cout << ans << '\n';
}
