#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int res1 = 0, res2 = 0;
  for (int i = 0; i < n; ++i) {
    if ((i & 1) == s[i] - '0')
      ++res1;
    else
      ++res2;
  }
  cout << min(res1, res2) << endl;
  return 0;
}
