use std::collections::VecDeque; 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(); if k < 4 { println!("0"); return; } let mut result = 0usize; for i in 2..=(k as f64).sqrt() as usize { if k % i > 0 { continue; } let ac = i; let ac = if ac / 2 + ac % 2 > n { 0 } else if ac <= n { ac - 1 } else { 1 + n - (ac - n) }; let bd = k / i; let bd = if bd / 2 + bd % 2 > n { 0 } else if bd <= n { bd - 1 } else { 1 + n - (bd - n) }; result += ac * bd; } println!("{}", result * 2); }