fun main(args: Array<String>) {
    val s = readLine() ?: return
    val h = s.length / 2
    val fh = s.take(h)
    val sh = s.takeLast(h)
    if (fh == sh.reversed()) {
        println("0")
        return
    }
    val hag = 0.until(h).sumBy {
        if (fh[it] != sh[h - it - 1]) {
            1
        } else {
            0
        }
    }
    println(hag.toString())
}