open System

let input1 = stdin.ReadLine().Split(' ')
let input2 = stdin.ReadLine().Split(' ')
//

//------------------------------------------------
let N = input1.[0] |> int
let M = input1.[1] |> int64
let V = input1.[2] |> int
let P = input1.[3] |> int
let A = input2 |> Array.map (fun x -> x |> int64) |> Array.take N

// ２分岐探査によりＯＫの最大インデックスを返す.
let rec searchB ng ok i b (a:int64 array) =
    let mid a b = (a+b)/2
    let next n o =
        let j = mid (n+1) o
        if j >= o then o
        else searchB n o j b a
    let calc m =
        let r = M*((V-P-i-1)|>int64)   // P-1個とiを含む要素までは最大値の割当としてその残り
        let u = [(i+1)..ok] |> List.map (fun j -> min M (m-a.[j])) |> List.sum
        if (r <= u) then next ng i else next i ok
    let m = a.[i] + M
    if m < b then next i ok else calc m

let solve =
    let a = A |> Array.sort
    let b = a.[N-P]
    let x = (a |> Array.findIndex (fun n -> n >= b))
    let s = x-(searchB -1 x (x-1) b a)
    s + (N-x)

solve |> printfn "%d"