fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); let mut k = String::new(); std::io::stdin().read_line(&mut k).ok(); let k: usize = k.trim().parse().unwrap(); let mut result = 0usize; let mut factors = vec![]; for i in 2..=(k as f64).sqrt().floor() as usize { if k % i == 0 { factors.push(i); if k / i != i { factors.push(k / i); } } } for &ac in factors.iter() { let bd = k / ac; let accnt = if ac > 2*n { 0 } else if ac <= n { ac-1 } else { 2*n+1-ac }; let bdcnt = if bd > 2*n { 0 } else if bd <= n { bd-1 } else { 2*n+1-bd }; result += accnt * bdcnt; } println!("{}", result); }