#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int w = 0;
  for (auto&& c : s) {
    if (c == '.') {
      w++;
    }
  }
  cout << min(w, (int)s.size() - w) << endl;
  return 0;
}
