
import std.stdio;
import std.string;
import std.array;

void main() {
  string line;
  int ans;
  while((line = readln.chomp).length != 0) {
    if (line.array.reverse == line.array) ans++;
  }
  ans.writeln;
}