#--------------------------------------------------
import strutils, sequtils, math, algorithm, tables, sets, lists, intsets, critbits, future
let read* = iterator: string {.closure.} =
    while true: (for s in stdin.readLine.split: yield s)
proc scan(): int = read().parseInt
#--------------------------------------------------
var n,k,m,r = scan()
var s = newSeqWith(n-1, scan())

s.sort(Descending)
s.add(0)
#var mkhyu = (r.float - (s[0..<k-1].sum.float / k.float)) * k.float
#s[0..<k]で合格点を達成できる可能性を考えられていなかった
if (r * k) - s[0..<k].sum  <=  0:
    echo 0
else:
    var mkhyu = (r * k) - s[0..<k-1].sum
    if mkhyu <= 0:  echo 0
    elif mkhyu <= m:echo mkhyu
    else:           echo -1