import std.stdio,std.string,std.conv;

int main()
{
	string s;
	int count = 0;
	while((s = readln.chomp).length != 0)
	{
		if(s.length == 1)
		{
			count++;
		}
		else
		{
			bool flag = true;
			foreach(i;0..s.length/2)
			{
				if(s[i] != s[s.length - i - 1])
				{
					flag = false;
				}
			}

			if(flag)
			{
				count++;
			}
		}
	}
	count.writeln;
	return 0;
}