//Thomas Meeks
//6/6/23
//Problem: Given a string, determine the minimal number of characters
//you must change to turn it into a palindrome.

//Solution, loop through the first half of the string and check for each character
// if its equal to the chracter at the corrosponding index of the last half of the string
// we will only loop through the first half of the string to avoid messy double counting
// looping through the the string size divided by two will not check
// the middle chracter on odd length strings, but since the middle chracter is always equal to itself
// we do not need to
#include <iostream>
using namespace std;
int main(){
  string s; cin >> s;
  int n = s.size();
  int ct = 0;
  //loop through first half of string
  for(int index = 0; index < n/2; index++){
    //the corrosponding index on the second half of the string can be found with s.size() - index -1
    //this is because for the first half if we at the second chracter we want to get the second to last
    //character (i.e the length of string - 2), we can then subtract 1 to make this 0 based.
    int SecondHalfIndex = n-index-1;
    if(s[index] != s[SecondHalfIndex]) ct++;
  }
  
  cout << ct;
  return 0;
}