while gets
  n, s = $_.split.map(&:to_i)
  break if n == 0 
  table = Hash.new(0)
  n.times do
    table[gets.to_i] += 1    
  end
  ret = 0
  table.each_key do |k|
    if k * 2 > s
      ret += table[i]*(table[i]-1) / 2
    end
    for j in (k+1)..100
      if table.key?(j) && k + j > s
        ret += table[k]*table[j]
      end
    end
  end
  p ret
end