```go
package main
import (
"bufio"
"fmt"
"os"
"sort"
)
func main() {
reader := bufio.NewReader(os.Stdin)
var n int
var a, b, k int64
fmt.Fscan(reader, &n, &a, &b, &k)
sum := a + b
costs := make([]int64, 0, n)
base := 0
for i := 0; i < n; i++ {
var h int64
fmt.Fscan(reader, &h)
r := h % sum
if r == 0 {
r = sum
}
if r <= a {
base++
} else {
cost := (r + a - 1) / a - 1
costs = append(costs, cost)
}
}
sort.Slice(costs, func(i, j int) bool { return costs[i] < costs[j] })
res := base
used := int64(0)
for _, c := range costs {
if used+c <= k {
used += c
res++
} else {
break
}
}
fmt.Println(res)
}
```