166
rbbbbbbbbbbbbrbrrbbrbbbrbbbbbbbbbbrbbbbbbrbbbrbbbbbrbbbbbbbrbbbbbbbrbbrbbbbbbbbrbbbbbbbbbbbbbbrrbbbrbbbbbbbbbbbbbbrbrbbbbbbbbbbbrbbbbbbbbbbbbbbrbbbbbbbbbbbbbbbbbbbbbb
 7
rrbrbrb
 1
r
 2
bb
 18
rrrrrrrrrrrrrrrrrb
 8
rbbrbrbr
 1
b
 13
rbbbrbrrbrrbb
 100
brbbbrrrbbrbrbbrbbrbbbbrbbrrbbbrrbbbbrbrbbbbbbbbbbbbbbbbrrrrbbbbrrrbbbbbbbrbrrbrbbbbrrrbbbbrbbrbbbrb
 2
rb
 2
rr
 2
br

70
 1
 0
 1
 8
 1
 0
 3
 34
 0
 1
 0

#include <bits/stdc++.h>
using namespace std;
bool is_prime(long long n) {
  if (n == 1) {
    return false;
  }
  long long i = 2;
  while (i * i <= n) {
    if (n % i == 0) {
      return false;
    }
    i += 1;
  }
  return true;
}
long long countSetBits(long long n) {
  long long count = 0;
  while (n) {
    count += n & 1;
    n >>= 1;
  }
  return count;
}
long long power(long long a, long long b) {
  long long ans = 1;
  while (b > 0) {
    if (b % 2 == 1) ans = (ans * a);
    a = (a * a);
    b = b / 2;
  }
  return ans;
}
int main() {
  long long t = 1;
  while (t--) {
    long long n, i, j, d, m, c = 0, ans = 0, r = 0, b = 0;
    string s;
    cin >> n >> s;
    for (i = 0; i < n; i++) {
      if (i % 2 == 0) {
        if (s[i] != 'r') r++;
      } else {
        if (s[i] != 'b') b++;
      }
    }
    long long x = max(r, b);
    r = 0;
    b = 0;
    for (i = 0; i < n; i++) {
      if (i % 2 == 0) {
        if (s[i] != 'b') b++;
      } else {
        if (s[i] != 'r') r++;
      }
    }
    long long y = max(r, b);
    cout << min(x, y);
  }
}
