let pocky l k = if l mod (2 * k) = 0 then (l / ( 2 * k ) - 1) * k else l / ( 2 * k ) * k let () = print_int @@ Scanf.sscanf (read_line ()) "%d %d" pocky