#include <bits/stdc++.h>
using namespace std;
int n, i, m1 = 0, m2 = 0;
char s[1000];
int main() {
  scanf("%d%s", &n, &s);
  for (i = 0; i < n; i += 2)
    if (s[i] != '0')
      m1++;
    else
      m2++;
  for (i = 1; i < n; i = i + 2)
    if ((s[i] != '1'))
      m1++;
    else
      m2++;
  printf("%d\n", min(m1, m2));
  return 0;
}
