#encoding:utf-8 No.0063
strings = []
while true
 str = gets.chomp
 if str == ""
  break
 end
 strings.push str
end

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

puts count