#include <bits/stdc++.h>
using namespace std;
int a[1005], b[1005];
int main() {
  long long m, n, i, j, k;
  cin >> m;
  for (i = 1; i <= m; i++) {
    char c;
    cin >> c;
    a[i] = c - '0';
  }
  int ans = 0, now = 0;
  for (i = 1; i <= m; i++) {
    if (a[i] % 2 == i % 2) ans++;
  }
  for (i = 1; i <= m; i++) {
    if (a[i] % 2 != i % 2) now++;
  }
  ans = min(ans, now);
  cout << ans << endl;
}
