def checkPalindrome(str)
  l = str.size/2

  for i in 0...l do
    if str[i] != str[-(i+1)]
      return false
    end
  end  

  return true
end

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

puts count