function myout(text){console.log(text);}//standard output
function Main(input) {
	//input = parseInt(input);
	input = input.split("");
	//input = input.split("\n");
	//input = input.split(" ").map((a)=>Number(a));
	//input = input.split("\n").map((a)=>Number(a));
  var output = 0;
  for(var i = 1; i <= input.length; i++){
    var mae = input[i-1];
    var ato = input[i];
    if(mae == ato){
       output++;
      if(ato == "1"){
         input[i] = "0";
         }else{
         input[i] = "1";
         }
    }
  }
  myout(output);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
