fun main(args:Array<String>){


    var (n) = readLine()!!.split(" ").map { it.toInt() }
    var (a,b) = readLine()!!.split(" ").map { it.toInt() }
    var list  = mutableListOf<Int>()
    list = readLine()!!.split(" ").map { it.toInt() }.toMutableList()

    var ans = 0;
    list.sort()

    ans = Math.min(list.count{it<=a},Math.min(list.count{it>a && it<=b},list.count{it>b}))

    println(ans)

}