#include<algorithm> using namespace std; int s[200010]; int main() { int n,m,k; scanf("%d%d%d", &n, &m, &k); for(int i = 0; i < n; i++) scanf("%d", &s[i]); sort(s, s+n); int s1 = s[n - 1]; int s2 = s[n - 2]; long long p = s1*k + s2; long long ans = m/(k+1)*p + m%(k+1)*s1; printf("%lld\n",ans); }