use std::io::*; fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let a: i64 = itr.next().unwrap().parse().unwrap(); let b: i64 = itr.next().unwrap().parse().unwrap(); let mut c = 0; while b * 1000 * (c + 1) <= a { c += 1; } println!("{}", 1000 * c); }