object Main extends App {
  var get = readLine
  var sum,sum2 = 0
  var collor = '0'
  for(i <- 0 until get.size){
    if(collor != get(i))
    	sum = sum + 1
    if(collor == get(i))
    	sum2 = sum2 + 1
    if(collor=='0') {
      collor='1'
    }
    else {
      collor='0'
    }
  }
  println(math.min(sum,sum2))
}