function Main(input) {
    var odd  = 0;
    var even = 0;
	for(var i = 0; i < input.length; i = i + 2) {
      if (input[i] === '0') {
          even++;
      } else {
          odd++;
      }
	}
	for(var i = 1; i < input.length; i = i + 2) {
      if (input[i] === '0') {
          odd++;
      } else {
          even++;
      }
	}
    console.log(even > odd ? odd : even);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));