function Main(input) {
	var c = 0;
	var l = input.length;
	var f = input.charAt(0);
	for ( var i = 0 ; i < l ; i++ ){
		var t = input.charAt(i);
		if((i%2) == 0 && t!=f){
			c++;
		}
		if((i%2) != 0 && t==f){
			c++;
		}
	}
	
	console.log(c);
}

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