(defn m[s i c](if(= c(. s charAt i)) 0 1)) (defn n[w] (loop[s w i 2 t 0] (if (< i (- (. s length) 2)) (if (not= \n (. s charAt i)) (recur s (inc i) (inc t)) (recur s (inc i) t)) t))) (loop[s (read-line)] (when(not= s nil) (if (<(. s length)5) (println -1) (let[w(. s toLowerCase)] (println (+ (m w 0 \l)(m w 1 \i)(n w)(m w (- (. w length) 2) \u)(m w (- (. w length) 1) \x))))) (recur(read-line))))