(defun main (&rest argv) (declare (ignorable argv)) (let* ((s (read)) (a (read)) (b (read)) (c (floor (* a b) (gcd a b))) (res (- (+ (floor s a) (floor s b)) (floor s c)))) (unless (zerop (mod s a)) (incf res)) (unless (zerop (mod s b)) (incf res)) (unless (zerop (mod s c)) (decf res)) (format t "~d~%" res))) (main)