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