#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, w = 0, b = 0;
  cin >> n;
  string s;
  cin >> s;
  for (i = 0; i < n; i++) {
    if (s[i] == '.') {
      w++;
    } else {
      b++;
    }
  }
  cout << min(b, w) << endl;
  return 0;
}
