#include <bits/stdc++.h>
using namespace std;
int main() {
  char c[200000];
  cin >> c;
  int s = 0;
  for (int i = 0; i < strlen(c); i++) {
    if (c[i] == c[i + 1]) {
      c[i + 1] = '1' - c[i + 1] + '0';
      s++;
    }
  }
  cout << s;
}
