#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int white = 0, black = 0;
  for (auto x : s) {
    if (x == '#') {
      white++;
    } else {
      black++;
    }
  }
  cout << min(white, black) << endl;
}
