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 ext = 0usize; for ac in 2..=(k as f64).sqrt() as usize { if k % ac > 0 { continue; } let bd = k / ac; if bd < 2 { continue; } let ac_pattern = if 2*n < ac { 0 } else if ac < n+1 { ac - 1 } else { 2*n + 1 - ac }; let bd_pattern = if 2*n < bd { 0 } else if bd < n+1 { bd - 1 } else { 2*n + 1 - bd }; if ac == bd { ext += ac_pattern * bd_pattern; continue; } result += ac_pattern * bd_pattern; } println!("{}", result * 2 + ext); }