'use strict';
function main(input) {
  const arr = input.trim().split('\n');
  const a = arr[0];
  const length = a.length;
  let count = 0;

  for (let i = 0; i < Math.ceil(length / 2); i ++) {
    if (a[i] === a[length - i]) {
      count++;
    }
  }
  
  console.log(count);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));