#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, cnt = 0;
  string S;
  cin >> N >> S;
  for (int i; i < N; i++) {
    if (S.at(i) == '.') cnt++;
  }
  cout << min(N - cnt, cnt) << endl;
}
