#include <bits/stdc++.h>
using namespace std;
int arr[2][2];
int main() {
  int n;
  cin >> n;
  string str1;
  cin >> str1;
  for (int i = 0; i < n; i++) arr[i % 2][str1[i] - '0']++;
  cout << min(arr[0][0] + arr[1][1], arr[0][1] + arr[1][0]) << endl;
  return 0;
}
