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