import java.util.*

fun main(args: Array<String>) {
	val S = Scanner(System.`in`).next()
	var ans = 0
	for (i in 0 until S.length) {
		if (i % 2 == S[i].toString().toInt()) {
			ans++
		}
	}
	println(if (S.length / 2 < ans) S.length - ans else ans)
}
