(defun main (&rest argv) (declare (ignorable argv)) (let* ((n (read)) (d (read))) (format t "~d~%" (1- (floor n (gcd n d)))))) (main)