import Foundation
func toTuple<T>(_ args: [T]) -> (T, T, T) { (args[0], args[1], args[2]) }
func readInts() -> [Int] { readLine()!.split(separator: " ").map { Int($0)! } }

let (n, _, x) = toTuple(readInts())
let ai = readInts()
print(min(ai.filter { $0 > 0 && $0 < x }.count, ai.filter { $0 > x && $0 < n}.count))