#pragma GCC optimize("Ofast") #pragma GCC target("avx2") #define rd() ({long v=0;{long _c;while(_c=*rp++-48,_c>=0)v=v*10+_c;}v;}) #define wt(v) {ulong _z=v;do*--wp=_z%10+48;while(_z/=10);} #define rep(v,e) for(long v=0;v>8|a[i]<<24; } } void radix_sort(unsigned*a,int n){ static unsigned b[100000]; radix_sort_aux(a,b,n); radix_sort_aux(b,a,n); radix_sort_aux(a,b,n); radix_sort_aux(b,a,n); } unsigned a[100000]; int main(){ ulong n,k; { char*mmap(); char*rp=mmap(0l,1l<<25,1,2,0,0ll); n=rd(); k=rd()*2; rep(i,n){ a[i]=rd(); } } radix_sort(a,n); ulong z=0; { long i=0,j=n-1; while(i=k){ j-=1; z+=n-i; } else{ i+=1; } } z=z*2-(n-i-1)*(n-i-1); if((ulong)a[i]*a[i]>=k){ z+=1; } } { char wbuf[64],*wp=wbuf+sizeof wbuf; wt(z); write(1,wp,wbuf+sizeof wbuf-wp); } _exit(0); }