var input = require('fs').readFileSync('/dev/stdin', 'utf8').trim();
var lines = input.split('\n');
var ret = lines.filter(function(line) {
    return line.trim() == line.trim().split('').reverse().join('');
});
console.log(ret.length);