fun main(arr: Array<String>) {
    var s = readLine()!!

    var ans = 0
    while (s.length > 1) {
        if(s.first() != s.last()) {
            ans++
        }
        s = s.drop(1).dropLast(1)
    }
    println(ans)
}
