#include <bits/stdc++.h>
using namespace std;
int oo = 1 << 30;
int count_dif(string a, string b) {
  int count = 0;
  for (int i = 0; i < a.size(); i++)
    if (a[i] != b[i]) count++;
  return count;
}
int main() {
  int n;
  string sq;
  cin >> n;
  cin >> sq;
  string c1 = "", c2 = "";
  for (int i = 0; i < n; i++)
    if (i % 2 == 0)
      c1 += '1';
    else
      c1 += '0';
  for (int i = 0; i < n; i++)
    if (i % 2 == 0)
      c2 += '0';
    else
      c2 += '1';
  cout << (min(count_dif(c1, sq), count_dif(c2, sq))) << endl;
}
