#encodping:utf-8 No.0063 2014.10.5
count = 0
words = []
while true
  w = gets.chomp
  if w == ""
    break
  end
  words.push w
end

words.length.times do |i|
  if words[i] == words[i].reverse
    count += 1
  end
end

puts count