(def s (clojure.string/trim (read-line)))
; (def s "redcoder")
; (def s "vvvvvv")

(defn solve [str]
  (let [matches (map = (seq str) (reverse str))
        pairs (count (filter #(= %1 false) matches))]
    (println (/ pairs 2))))

(solve s)