#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N, a, b;
  a = 0;
  b = 0;
  string S;
  cin >> N >> S;
  for (int i = 0; i < N; i++) {
    if (S[i] == '.') {
      a += 1;
    } else {
      b += 1;
    }
  }
  if (a <= b)
    cout << a << endl;
  else
    cout << b << endl;
}
