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