(defun toggle-last-bit (s) (if (string= (subseq s (1- (length s))) "0") (concatenate 'string (subseq s 0 (1- (length s))) "1") (concatenate 'string (subseq s 0 (1- (length s))) "0"))) (defun main (&rest argv) (declare (ignorable argv)) (let* ((s (read-line))) (format t "~a~%" (toggle-last-bit s)))) (main)