'use strict';
const main = input => {
  const s = input[0];
  let count = 0;
  for(let i=0; i<Math.floor(s.length/2); i++) {
    if (s[i] != s[s.length-1-i]) count++;
  }
  console.log(count);
}
main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));