use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let l: Vec<_> = s.lines().collect(); let n: Vec = l[0].split(' ').flat_map(str::parse).collect(); let mut a: Vec = l[1].split(' ').flat_map(str::parse).collect(); a.sort(); a.reverse(); let mut x = 0; for i in 0..n[0] { let (mut l, mut r) = (0, n[0]); while l < r { let j = (l + r) / 2; if a[i] * a[j] >= 2 * n[1] { l = j + 1 } else { r = j } } x += l; } println!("{x}") }