fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let n: Vec = s.split_whitespace().flat_map(str::parse).collect(); let mut a = 1 + (n[1] < 1) as u64; let d = n[0] - n[1]; for i in 2.. { if i * i > d { break; } if d % i == 0 { a += 2; } if i * i == d { a -= 1; } } println!("{a}") }