fun main(args: Array<String>) {
    val S = next()
    var L = 0
    var n = 0
    while (n < S.length / 2) {
        if (S[n] == S[S.length - n - 1]) L += 1
        n += 1
    }
    println((S.length - L * 2) / 2)
}
fun next() = readLine()!!