#include <bits/stdc++.h>
using namespace std;
int solve(int ini, string board) {
  int ans = 0;
  int cnt = 0;
  for (int i = 0; i < board.size(); i++) {
    int t = (i + ini) % 2;
    if (t != board[i] - '0') ans++;
  }
  return ans;
}
int main() {
  int n;
  string board;
  cin >> n;
  cin >> board;
  int a = solve(0, board);
  int b = solve(1, board);
  int ans = min(a, b);
  cout << ans << endl;
  return 0;
}
