use std::io::{self, BufRead}; fn main() { let input = io::stdin() .lock() .lines() .map(std::result::Result::unwrap) .collect::>(); let mut w = input[0].parse::().unwrap(); let d = input[1].parse::().unwrap(); for i in (2..=d).rev() { w -= w / (i * i); } println!("{}", w); }