#include <bits/stdc++.h>
using namespace std;
char a[100000];
int n, s1, s2, e;
int main() {
  cin >> n;
  cin >> a;
  for (int i = 0; i < n; i++) {
    e = (i % 2);
    if (a[i] == (e + '0'))
      s1++;
    else
      s2++;
  }
  cout << (s1 < s2 ? s1 : s2);
  return 0;
}
