(defun main (&rest argv) (declare (ignorable argv)) (let* ((h (read)) (a (read)) (d (read)) (dp (make-array 10001 :initial-element 1000000000d0))) (setf (aref dp 0) 0d0) (dotimes (i h) (when (< (aref dp i) 1000000000d0) (let ((c 0)) (setq c (min h (+ i a))) (setf (aref dp c) (min (aref dp c) (+ (aref dp i) 1d0))) (setq c (min h (+ i d))) (setf (aref dp c) (min (aref dp c) (+ (aref dp i) 1.5d0)))))) (format t "~f~%" (aref dp h)))) (main)