import java.util.Scanner

fun a(sc: Scanner): String {
    if (sc.nextInt() + sc.nextInt() + sc.nextInt() < 22) {
        return "win"
    }
    return "bust"
}

fun b(sc: Scanner): String {
    val s = sc.next()
    val sr = s.reversed()
    val l = s.length
    var ans = 0
    s.forEachIndexed { index, c ->
        if (index * 2 >= l) {
            return ans.toString()
        }
        if (c != sr[index]) ans++
    }
    return "0"
}

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    println(
//        a(sc)
        b(sc)
    )
}