import java.util.*;
import java.io.*;
public class Main {
static final int N = 100010;
static int[] a = new int[N];
static int n, k, x;
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] str = br.readLine().split(" ");
n = Integer.parseInt(str[0]);
k = Integer.parseInt(str[1]);
x = Integer.parseInt(str[2]);
str = br.readLine().split(" ");
for (int i = 1; i <= n; i++) a[i] = Integer.parseInt(str[i - 1]);
long l = (long)-2e18, r = (long)1e9;
while (l < r) {
long mid = l + r >> 1;
if (cheek(mid)) r = mid;
else l = mid + 1;
}
System.out.println(l);
}
static boolean cheek(long mid) {
int cnt = k;
double X = x;
for (int i = 1; i <= n; i++) {
if (a[i] > mid) {
cnt -= (int) Math.ceil((a[i] - mid) / X);
if (cnt < 0) return false;
}
}
return true;
}
}