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