main = do
  s <- getContents
  let ln = lines $ s
  let n = length . filter id . map isPalin $ ln
  putStrLn . show $ n

isPalin::[Char] -> Bool
isPalin [] = True
isPalin [a] = True
isPalin (x:xs)
  | x == (last xs) = isPalin (init xs)
  | otherwise = False