import std.stdio;
import std.string;
import std.conv;
import std.algorithm;
import std.range;

void main() {
  int ans;
  foreach (dchar[] line; stdin.lines) {
    line = line.chomp;
    if (line == line.retro.array) ans++;
  }
  ans.writeln;
}