#encoding:utf-8
words = []
while true
 word = gets.chomp
 if word == ""
  break
 end
 words.push word
end

count = 0
i = 0
while i < words.length
 if words[i] == words[i].reverse
  count += 1
 end
 i += 1
end

puts count