#!/usr/bin/env gosh (define (main _) (let* ([l (read)][k (read)]) (let-values ([(q r) (div-and-mod (/ l 2) k)]) (display (* (if (zero? r) (- q 1) q) k)) )) (newline) 0)