cnt = 0
while a = gets
  break if a == "\n"
  flag = true

  a = a.chomp.split("")
  (a.length / 2).times do |i|
    unless a[i] == a[-1 * (i+1)]
      flag = false
      break
    end
  end
  cnt += 1 if flag
end
puts cnt