import Control.Applicative

type Problem = [String]

type Result = Int

solve :: Problem -> Result

solve list
    = length [text | text <- list, text == reverse text]
    
main :: IO ()

main
    = do
        list <- lines <$> getContents
        print $ solve list