import java.util.Scanner;

fun main (args : Array<String>) {
  val input = Scanner(System.`in`)
  
  while (input.hasNext()) {
    val S = input.next()
    var count = 0
    var i = 0
    var j = S.length - 1
    
    while (i < j) {
      if (S[i++] != S[j--]) {
        ++count
      }
    }
    
    println(count)
  }
}