use std::io::stdin; pub fn main() { let (l, k): (u64, u64) = { let mut s = String::new(); let _ = stdin().read_line(&mut s); let mut v = s.split_whitespace().flat_map(|x| x.parse()); (v.next().unwrap(), v.next().unwrap()) }; let mut haruka = 0; let mut yu = 0; while haruka + yu < l { haruka += k; if haruka + yu + k < l { yu += k; } } println!("{}", yu); }