#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  cin >> s;
  int cnt = 0;
  for (int i = 0; i < s.size(); i++) {
    if ((i % 2 && s[i] != '0') || (i % 2 == 0 && s[i] != '1')) cnt++;
  }
  cout << min((int)s.size() - cnt, cnt) << '\n';
  return 0;
}
