#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int a, white = 0, black = 0;
  string inp;
  cin >> a >> inp;
  for (int i = 0; i < inp.length(); i++) {
    if (inp[i] == '.') {
      white++;
    } else {
      black++;
    }
  }
  if (white > black) {
    cout << black << endl;
  } else {
    cout << white << endl;
  }
  return 0;
}
