; 全通り掛けてから k になる場合を足し合わせ 36 で割る
(defvar *prime-dice* '(2 3 5 7 11 13))
(defvar *composite-dice* '(4 6 8 9 10 12))
(defun main ()
  (let* ((k (read))
         (r 0))
    (dolist (i *prime-dice*)
      (dolist (j *composite-dice*)
        (when (= k (* i j)) (incf r))))
    (format t "~,15f~%" (/ r 36d0))))
(main)