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;
template <typename T>
std::ostream &operator<<(std::ostream &out, vector<T> &v) {
  for (typename vector<T>::size_type i = 0; i < v.size(); ++i)
    out << v[i] << " ";
  out << "\n";
  return out;
}
template <typename T, typename N>
std::ostream &operator<<(std::ostream &out, vector<pair<T, N> > &v) {
  for (size_t i = 0; i < v.size(); ++i)
    out << "(" << v[i].first << ", " << v[i].second << ") ";
  out << "\n";
  return out;
}
template <typename T>
std::ostream &operator<<(std::ostream &out, vector<vector<T> > &v) {
  for (size_t i = 0; i < v.size(); ++i) {
    for (size_t j = 0; j < v[i].size(); ++j) {
      out << v[i][j] << " ";
    }
    out << "\n";
  }
  return out;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  string cockroaches;
  cin >> cockroaches;
  string model1 = "", model2 = "";
  if (n & 1) {
    for (int i = 0; i < n / 2; ++i) {
      model1 += "rb";
      model2 += "br";
    }
    model1.push_back('r');
    model2.push_back('b');
  } else {
    for (int i = 0; i < n / 2; ++i) {
      model1 += "rb";
      model2 += "br";
    }
  }
  int misplaced_b = 0, misplaced_r = 0;
  for (int i = 0; i < n; ++i) {
    if (cockroaches[i] != model1[i]) {
      if (cockroaches[i] == 'b') {
        ++misplaced_b;
      } else {
        ++misplaced_r;
      }
    }
  }
  int ans = min(misplaced_r, misplaced_b) + abs(misplaced_b - misplaced_r);
  misplaced_b = 0;
  misplaced_r = 0;
  for (int i = 0; i < n; ++i) {
    if (cockroaches[i] != model2[i]) {
      if (cockroaches[i] == 'b') {
        ++misplaced_b;
      } else {
        ++misplaced_r;
      }
    }
  }
  int ans2 = min(misplaced_r, misplaced_b) + abs(misplaced_b - misplaced_r);
  cout << min(ans, ans2) << "\n";
  return 0;
}
