var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
 
var lines = [];
reader.on('line',(line) => {
          lines.push(line);
});
 
reader.on('close', () => {
          var line = lines[0];
  var s = [...line];
  var L = s.length
  var x = 0;
  for(var i = 0; i < L; i++){
    var D = i - s[i];
    if( D % 2 == 0){
      x = x + 1;
    }
  }
  if(x <= L/2){
    console.log(x);
  } else {
    console.log(L - x);
  }
});