#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n;
  cin >> s;
  int kuro = 0;
  int shiro = -1;
  for (int i = 0; i < n; i++) {
    string k(1, s[i]);
    if (k == ".") {
      kuro += 1;
    } else {
      shiro += 1;
    }
  }
  if (shiro < 0) {
    shiro = 0;
  }
  if (kuro > shiro) {
    cout << shiro << endl;
  } else {
    cout << kuro << endl;
  }
  return 0;
}
