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