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