#include<iostream>
#include<string>
using namespace std;
int main() {
	int i = 0, size,result=0;
	string S;
	cin >> S;
	size = S.size();
	while (i != size) {
		i++;
		if (S[i - 1] == S[i]) {
			result++;
			S[i] = !(S[i] - '0') + '0';
		}
	}
	cout << result << endl;
	return 0;
}
