package main import . "fmt" import . "os" import bf "bufio" import . "slices" func main() { rd:=bf.NewReader(Stdin) var n int var k int64 Fscan(rd,&n,&k) a:=make([]int64,n) for i:=range a { Fscan(rd,&a[i]) } Sort(a) k*=2 var ans int p:=n-1 for _,x:=range a { e:=(k+x-1)/x for ;p>=0&&a[p]>=e;p-- {} ans+=n-(p+1) } Println(ans) }