def checkPalindrome(str)
  strArray = str.split(//)
  (strArray.size / 2).times do
    return false    if  strArray.shift != strArray.pop
  end
  return true
end

numPalindrome = 0
while input = gets
  numPalindrome += 1  if  checkPalindrome(input.chomp)
end
puts numPalindrome