fun main(args: Array<String>) {
    val S = readLine()!!

    println(if (S[0] == '0') {
        S.filterIndexed { index, c -> index % 2 == 0 }.count { it == '1' } + S.filterIndexed { index, c -> index % 2 != 0 }.count { it == '0' }
    } else {
        S.filterIndexed { index, c -> index % 2 == 0 }.count { it == '0' } + S.filterIndexed { index, c -> index % 2 != 0 }.count { it == '1' }
    })
}