(let ((n (read))
    (other 0)
    (ans 0))
    (defparameter *hash* (make-hash-table))

    (loop for i below n do
        (case (floor (/ (read) 400))
            (0 (setf (gethash 'hai *hash*) 1))
            (1 (setf (gethash 'cha *hash*) 1))
            (2 (setf (gethash 'midori *hash*) 1))
            (3 (setf (gethash 'mizu *hash*) 1))
            (4 (setf (gethash 'ao *hash*) 1))
            (5 (setf (gethash 'ki *hash*) 1))
            (6 (setf (gethash 'daidai *hash*) 1))
            (7 (setf (gethash 'aka *hash*) 1))
            ((8 9 10 11 12) (incf other))
        )
    )
    (maphash #'(lambda (key value)
            (if (= value 1)
                (incf ans)
            )
        )
    *hash*)

    (if (= ans 0)
        (format t "0")
        (format t "~D" ans)
    )

    (incf ans other)
    (if (<= 8 ans)
        (format t " 8~%")
        (format t " ~D~%" ans)
    )
)