loop do
    n, s = gets.split.map(&:to_i)
    break if n == 0
    a = (1..n).map { gets.to_i }.sort
    i = 0
    j = a.size - 1
    k = (a[i] + a[j] > s ? 1 : 0)
    loop do
        i += 1 until i >= j || a[i] + a[j] > s
        while a[i] + a[j] > s
            k += 1
            j -= 1
            break if i >= j
        end
        break if i >= j
    end
    p k
end
