#include <bits/stdc++.h>
using namespace std;
int countcolour2(string& s, int n) {
  vector<int> v(n + 1);
  vector<char> v2(n + 1);
  for (int i = 0; i < n; i++) {
    v2.at(i) = '#';
  }
  bool bo = true;
  int count;
  int j = 0;
  while (bo) {
    count = 0;
    for (int i = 0; i < n; i++) {
      if (!(v2.at(i) == s.at(i))) {
        count++;
      }
    }
    if (j == n + 1) {
      bo = false;
    } else {
      v.at(j) = count;
      v2.at(j) = '.';
      j++;
    }
  }
  int minnum = v.at(0);
  for (int i = 0; i < n + 1; i++) {
    if (v.at(i) < minnum) {
      minnum = v.at(i);
    }
  }
  return minnum;
}
int main() {
  int n;
  string s;
  cin >> n;
  cin >> s;
  cout << countcolour2(s, n) << endl;
}
