use std::io; fn main() { let mut line = String::new(); io::stdin().read_line(&mut line).unwrap(); let n: i64 = line.trim().parse().unwrap(); line.clear(); io::stdin().read_line(&mut line).unwrap(); let m: i64 = line.trim().parse().unwrap(); println!("{}", ((n / 1000) / m) * 1000); }