fun main(args:Array<String>){
  var s = readLine()!!.toCharArray()
  var size = s.size
  var count = 0
  if(s[0]=='0'){
    for(i in 1..size-1){
      var o = i%2
      if(s[i] != '1' && o == 1){
        s[i] = '1'
        count++
      }else if(s[i] != '0' && o == 0){
        s[i] = '0'
        count++
      }
    }
  }
  else if(s[0]=='1'){
    for(i in 1..size-1){
      var o = i%2
      if(s[i] != '0' && o == 1){
        s[i] = '0'
        count++
      }else if(s[i] != '1' && o == 0){
        s[i] = '1'
        count++
      }
    }
  }
  println(count)
}