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