use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut n: Vec = s.split_whitespace().flat_map(str::parse).collect(); (2..=n[1]).rev().for_each(|d| n[0] -= n[0] / (d * d)); println!("{}", n[0]); }