#include <bits/stdc++.h>
long long int n;
char v[1005];
int main() {
  scanf("%lld %s", &n, v);
  long long int x0 = 0, y0 = 0;
  for (long long int i = 0; i < n; i++) {
    (i % 2 == (v[i] - '0')) ? x0++ : y0++;
  }
  printf("%lld\n", (x0 < y0) ? x0 : y0);
  return 0;
}
