#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10, mod = 1e9 + 7, INF = 0x3f3f3f3f;
char s[maxn], t[maxn];
int solve(int n) {
  int ans = 0;
  for (int i = 0; i < n; ++i) ans += s[i] != t[i];
  return ans;
}
int main() {
  int n, ans = INF;
  cin >> n;
  scanf("%s", s);
  for (int i = 0; i < n; ++i) t[i] = i % 2 + '0';
  ans = min(ans, solve(n));
  for (int i = 0; i < n; ++i) t[i] = (i + 1) % 2 + '0';
  ans = min(ans, solve(n));
  cout << ans;
  return 0;
}
