#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int count = 0;
  string ans;
  if (s[0] == '1') {
    for (long long int i = 0; i <= (s.size() - 1); ++i) {
      if (i % 2 != 0)
        ans += '0';
      else
        ans += '1';
    }
  } else {
    for (long long int j = 0; j <= (s.size() - 1); ++j) {
      if (j % 2 != 0)
        ans += '0';
      else
        ans += '1';
    }
  }
  for (long long int k = 0; k <= (s.size() - 1); ++k) {
    if (s[k] != ans[k]) ++count;
  }
  cout << count << endl;
  return 0;
}
