#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long N;
  string S;
  cin >> N;
  cin >> S;
  int wc = 0, bc = 0;
  for (long i = 0; i < N; i++) {
    if (S[i] == '.')
      wc++;
    else
      bc++;
  }
  if (wc >= bc)
    cout << bc << endl;
  else
    cout << wc << endl;
  return 0;
}
